Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into 9/6/2015_baymerge

Conflicts:
	.travis.yml
	code/game/gamemodes/cult/cult.dm
	code/game/gamemodes/heist/heist.dm
	code/game/gamemodes/ninja/ninja.dm
	code/game/gamemodes/nuclear/nuclear.dm
	code/game/gamemodes/traitor/traitor.dm
	code/game/gamemodes/wizard/wizard.dm
	code/game/jobs/job/civilian.dm
	code/game/jobs/job/medical.dm
	code/game/jobs/job/security.dm
	code/game/objects/structures/lattice.dm
	code/global.dm
	code/modules/projectiles/ammunition/boxes.dm
	code/modules/reagents/Chemistry-Recipes.dm
	config/example/config.txt
	polaris.dme
This commit is contained in:
Neerti
2015-09-06 18:26:06 -04:00
377 changed files with 17701 additions and 16938 deletions
+1
View File
@@ -4,6 +4,7 @@
icon_state = "x2"
anchored = 1.0
unacidable = 1
simulated = 0
/obj/effect/landmark/New()
..()
+11 -39
View File
@@ -1,8 +1,6 @@
//TODO: Flash range does nothing currently
///// Z-Level Stuff
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, z_transfer = 1)
///// Z-Level Stuff
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, z_transfer = UP|DOWN)
src = null //so we don't abort once src is deleted
spawn(0)
if(config.use_recursive_explosions)
@@ -14,23 +12,19 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
epicenter = get_turf(epicenter)
if(!epicenter) return
///// Z-Level Stuff
if(z_transfer && (devastation_range > 0 || heavy_impact_range > 0))
//transfer the explosion in both directions
explosion_z_transfer(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range)
///// Z-Level Stuff
// Handles recursive propagation of explosions.
if(devastation_range > 2 || heavy_impact_range > 2)
if(HasAbove(epicenter.z) && z_transfer & UP)
explosion(GetAbove(epicenter), max(0, devastation_range - 2), max(0, heavy_impact_range - 2), max(0, light_impact_range - 2), max(0, flash_range - 2), 0, UP)
if(HasBelow(epicenter.z) && z_transfer & DOWN)
explosion(GetAbove(epicenter), max(0, devastation_range - 2), max(0, heavy_impact_range - 2), max(0, light_impact_range - 2), max(0, flash_range - 2), 0, DOWN)
var/max_range = max(devastation_range, heavy_impact_range, light_impact_range, flash_range)
//playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(devastation_range*2,1) )
//playsound(epicenter, "explosion", 100, 1, round(devastation_range,1) )
// Play sounds; we want sounds to be different depending on distance so we will manually do it ourselves.
// Stereo users will also hear the direction of the explosion!
// Calculate far explosion sound range. Only allow the sound effect for heavy/devastating explosions.
// 3/7/14 will calculate to 80 + 35
// Play sounds; we want sounds to be different depending on distance so we will manually do it ourselves.
// Stereo users will also hear the direction of the explosion!
// Calculate far explosion sound range. Only allow the sound effect for heavy/devastating explosions.
// 3/7/14 will calculate to 80 + 35
var/far_dist = 0
far_dist += heavy_impact_range * 5
far_dist += devastation_range * 20
@@ -62,10 +56,6 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[epicenter.x];Y=[epicenter.y];Z=[epicenter.z]'>JMP</a>)")
log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ")
// var/lighting_controller_was_processing = lighting_controller.processing //Pause the lighting updates for a bit
// lighting_controller.processing = 0
var/approximate_intensity = (devastation_range * 3) + (heavy_impact_range * 2) + light_impact_range
var/powernet_rebuild_was_deferred_already = defer_powernet_rebuild
// Large enough explosion. For performance reasons, powernets will be rebuilt manually
@@ -107,7 +97,6 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
sleep(8)
// if(!lighting_controller.processing) lighting_controller.processing = lighting_controller_was_processing
if(!powernet_rebuild_was_deferred_already && defer_powernet_rebuild)
makepowernets()
defer_powernet_rebuild = 0
@@ -119,20 +108,3 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
proc/secondaryexplosion(turf/epicenter, range)
for(var/turf/tile in range(range, epicenter))
tile.ex_act(2)
///// Z-Level Stuff
proc/explosion_z_transfer(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, up = 1, down = 1)
var/turf/controllerlocation = locate(1, 1, epicenter.z)
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
if(controller.down)
//start the child explosion, no admin log and no additional transfers
explosion(locate(epicenter.x, epicenter.y, controller.down_target), max(devastation_range - 2, 0), max(heavy_impact_range - 2, 0), max(light_impact_range - 2, 0), max(flash_range - 2, 0), 0, 0)
if(devastation_range - 2 > 0 || heavy_impact_range - 2 > 0) //only transfer further if the explosion is still big enough
explosion(locate(epicenter.x, epicenter.y, controller.down_target), max(devastation_range - 2, 0), max(heavy_impact_range - 2, 0), max(light_impact_range - 2, 0), max(flash_range - 2, 0), 0, 1)
if(controller.up)
//start the child explosion, no admin log and no additional transfers
explosion(locate(epicenter.x, epicenter.y, controller.up_target), max(devastation_range - 2, 0), max(heavy_impact_range - 2, 0), max(light_impact_range - 2, 0), max(flash_range - 2, 0), 0, 0)
if(devastation_range - 2 > 0 || heavy_impact_range - 2 > 0) //only transfer further if the explosion is still big enough
explosion(locate(epicenter.x, epicenter.y, controller.up_target), max(devastation_range - 2, 0), max(heavy_impact_range - 2, 0), max(light_impact_range - 2, 0), max(flash_range - 2, 0), 1, 0)
///// Z-Level Stuff
+6 -1
View File
@@ -409,7 +409,12 @@ var/list/global/slot_flags_enumeration = list(
/obj/item/proc/ui_action_click()
attack_self(usr)
/obj/item/proc/IsShield()
//RETURN VALUES
//handle_shield should return a positive value to indicate that the attack is blocked and should be prevented.
//If a negative value is returned, it should be treated as a special return value for bullet_act() and handled appropriately.
//For non-projectile attacks this usually means the attack is blocked.
//Otherwise should return 0 to indicate that the attack is not affected in any way.
/obj/item/proc/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
return 0
/obj/item/proc/get_loc_turf()
+10 -8
View File
@@ -11,6 +11,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
item_state = "electronic"
w_class = 2.0
slot_flags = SLOT_ID | SLOT_BELT
sprite_sheets = list("Resomi" = 'icons/mob/species/resomi/id.dmi')
//Main variables
var/owner = null
@@ -1142,21 +1143,22 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(choice == 1)
if (id)
remove_id()
return 1
else
var/obj/item/I = user.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
user.drop_item()
if (istype(I, /obj/item/weapon/card/id) && user.unEquip(I))
I.loc = src
id = I
return 1
else
var/obj/item/weapon/card/I = user.get_active_hand()
if (istype(I, /obj/item/weapon/card/id) && I:registered_name)
if (istype(I, /obj/item/weapon/card/id) && I:registered_name && user.unEquip(I))
var/obj/old_id = id
user.drop_item()
I.loc = src
id = I
user.put_in_hands(old_id)
return
return 1
return 0
// access to status display signals
/obj/item/device/pda/attackby(obj/item/C as obj, mob/user as mob)
@@ -1184,9 +1186,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
else
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
if(((src in user.contents) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) )
id_check(user, 2)
user << "<span class='notice'>You put the ID into \the [src]'s slot.</span>"
updateSelfDialog()//Update self dialog on success.
if(id_check(user, 2))
user << "<span class='notice'>You put the ID into \the [src]'s slot.</span>"
updateSelfDialog()//Update self dialog on success.
return //Return in case of failed check or when successful.
updateSelfDialog()//For the non-input related code.
else if(istype(C, /obj/item/device/paicard) && !src.pai)
+1 -1
View File
@@ -221,7 +221,7 @@
if(!radio_controller)
return
if (src.frequency < 1441 || src.frequency > 1489)
if (src.frequency < PUBLIC_LOW_FREQ || src.frequency > PUBLIC_HIGH_FREQ)
src.frequency = sanitize_frequency(src.frequency)
set_frequency(frequency)
+11 -7
View File
@@ -105,12 +105,13 @@
if(istype(ai.loc, /turf/))
new /obj/structure/AIcore/deactivated(get_turf(ai))
ai.carded = 1
admin_attack_log(user, ai, "Carded with [src.name]", "Was carded with [src.name]", "used the [src.name] to card")
src.name = "[initial(name)] - [ai.name]"
ai.loc = src
ai.cancel_camera()
ai.destroy_eyeobj(src)
ai.cancel_camera()
ai.control_disabled = 1
ai.aiRestorePowerRoutine = 0
carded_ai = ai
@@ -120,10 +121,14 @@
if(user.client)
user << "<span class='notice'><b>Transfer successful:</b></span> [ai.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
ai.canmove = 1
update_icon()
return 1
/obj/item/device/aicard/proc/clear()
if(carded_ai && istype(carded_ai.loc, /turf))
carded_ai.canmove = 0
carded_ai.carded = 0
name = initial(name)
carded_ai = null
update_icon()
@@ -140,10 +145,9 @@
carded_ai.show_message(rendered, type)
..()
/*
/obj/item/device/aicard/relaymove(var/mob/user, var/direction)
if(src.loc && istype(src.loc.loc, /obj/item/rig_module))
var/obj/item/rig_module/module = src.loc.loc
if(!module.holder || !direction)
return
module.holder.forced_move(direction)*/
if(user.stat || user.stunned)
return
var/obj/item/weapon/rig/rig = src.get_rig()
if(istype(rig))
rig.forced_move(direction, user)
+12 -26
View File
@@ -64,30 +64,18 @@
var/flashfail = 0
if(iscarbon(M))
var/safety = M:eyecheck()
if(safety <= 0)
M.Weaken(10)
flick("e_flash", M.flash)
if(ishuman(M) && ishuman(user) && M.stat!=DEAD)
if(user.mind && user.mind in revs.head_revolutionaries)
var/revsafe = 0
for(var/obj/item/weapon/implant/loyalty/L in M)
if(L && L.implanted)
revsafe = 1
break
M.mind_initialize() //give them a mind datum if they don't have one.
if(M.mind.has_been_rev)
revsafe = 2
if(!revsafe)
M.mind.has_been_rev = 1
revs.add_antagonist(M.mind)
else if(revsafe == 1)
user << "<span class='warning'>Something seems to be blocking the flash!</span>"
else
user << "<span class='warning'>This mind seems resistant to the flash!</span>"
else
flashfail = 1
if(M.stat!=DEAD)
var/safety = M:eyecheck()
if(safety <= 0)
var/flash_strength = 10
if(ishuman(M))
var/mob/living/carbon/human/H = M
flash_strength *= H.species.flash_mod
if(flash_strength > 0)
M.Weaken(flash_strength)
flick("e_flash", M.flash)
else
flashfail = 1
else if(issilicon(M))
M.Weaken(rand(5,10))
@@ -194,8 +182,6 @@
desc = "When a problem arises, SCIENCE is the solution."
icon_state = "sflash"
origin_tech = list(TECH_MAGNET = 2, TECH_COMBAT = 1)
var/construction_cost = list(DEFAULT_WALL_MATERIAL=750,"glass"=750)
var/construction_time=100
/obj/item/device/flash/synthetic/attack(mob/living/M as mob, mob/user as mob)
..()
+8 -16
View File
@@ -16,14 +16,9 @@
/obj/item/device/flashlight/initialize()
..()
if(on)
icon_state = "[initial(icon_state)]-on"
set_light(brightness_on)
else
icon_state = initial(icon_state)
set_light(0)
update_icon()
/obj/item/device/flashlight/proc/update_brightness(var/mob/user = null)
/obj/item/device/flashlight/update_icon()
if(on)
icon_state = "[initial(icon_state)]-on"
set_light(brightness_on)
@@ -36,7 +31,7 @@
user << "You cannot turn the light on while in this [user.loc]." //To prevent some lighting anomalities.
return 0
on = !on
update_brightness(user)
update_icon()
user.update_action_buttons()
return 1
@@ -171,11 +166,7 @@
on = 0
src.force = initial(src.force)
src.damtype = initial(src.damtype)
if(ismob(loc))
var/mob/U = loc
update_brightness(U)
else
update_brightness(null)
update_icon()
/obj/item/device/flashlight/flare/attack_self(mob/user)
@@ -206,10 +197,11 @@
on = 1 //Bio-luminesence has one setting, on.
/obj/item/device/flashlight/slime/New()
..()
set_light(brightness_on)
spawn(1) //Might be sloppy, but seems to be necessary to prevent further runtimes and make these work as intended... don't judge me!
update_brightness()
icon_state = initial(icon_state)
/obj/item/device/flashlight/slime/update_icon()
return
/obj/item/device/flashlight/slime/attack_self(mob/user)
return //Bio-luminescence does not toggle.
+6 -6
View File
@@ -10,12 +10,12 @@
var/looking_for_personality = 0
var/mob/living/silicon/pai/pai
/*/obj/item/device/paicard/relaymove(var/mob/user, var/direction)
if(src.loc && istype(src.loc.loc, /obj/item/rig_module))
var/obj/item/rig_module/module = src.loc.loc
if(!module.holder || !direction)
return
module.holder.forced_move(direction)*/
/obj/item/device/paicard/relaymove(var/mob/user, var/direction)
if(user.stat || user.stunned)
return
var/obj/item/weapon/rig/rig = src.get_rig()
if(istype(rig))
rig.forced_move(direction, user)
/obj/item/device/paicard/New()
..()
@@ -13,13 +13,15 @@
var/translate_hive = 0
var/obj/item/device/encryptionkey/keyslot1 = null
var/obj/item/device/encryptionkey/keyslot2 = null
maxf = 1489
var/ks1type = /obj/item/device/encryptionkey
var/ks2type = null
sprite_sheets = list("Resomi" = 'icons/mob/species/resomi/ears.dmi')
/obj/item/device/radio/headset/New()
..()
internal_channels.Cut()
if(ks1type)
keyslot1 = new ks1type(src)
if(ks2type)
@@ -33,11 +35,14 @@
keyslot2 = null
..()
/obj/item/device/radio/headset/list_channels(var/mob/user)
return list_secure_channels()
/obj/item/device/radio/headset/examine(mob/user)
if(!(..(user, 1) && radio_desc))
return
user << "The following channels are built-in:"
user << "The following channels are available:"
user << radio_desc
/obj/item/device/radio/headset/handle_message_mode(mob/living/M as mob, message, channel)
@@ -175,21 +180,7 @@
icon_state = "com_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/hop
/*
/obj/item/device/radio/headset/headset_mine
name = "mining radio headset"
desc = "Headset used by miners. How useless. To access the mining channel, use :d."
icon_state = "mine_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_mine
/obj/item/device/radio/headset/heads/qm
name = "quartermaster's headset"
desc = "The headset of the man who control your toiletpaper supply. To access the cargo channel, use :q. For mining, use :d."
icon_state = "cargo_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/qm
*/
/obj/item/device/radio/headset/headset_cargo
name = "supply radio headset"
desc = "A headset used by the QM and their slaves."
@@ -209,7 +200,6 @@
desc = "The headset of the boss's boss."
icon_state = "com_headset"
item_state = "headset"
freerange = 1
ks2type = /obj/item/device/encryptionkey/ert
/obj/item/device/radio/headset/ia
@@ -1,5 +1,5 @@
/obj/item/device/radio/intercom
name = "station intercom"
name = "station intercom (General)"
desc = "Talk through this."
icon_state = "intercom"
anchored = 1
@@ -7,14 +7,64 @@
canhear_range = 2
flags = CONDUCT | NOBLOODY
var/number = 0
var/anyai = 1
var/mob/living/silicon/ai/ai = list()
var/last_tick //used to delay the powercheck
/obj/item/device/radio/intercom/custom
name = "station intercom (Custom)"
broadcasting = 0
listening = 0
/obj/item/device/radio/intercom/interrogation
name = "station intercom (Interrogation)"
frequency = 1449
/obj/item/device/radio/intercom/private
name = "station intercom (Private)"
frequency = AI_FREQ
/obj/item/device/radio/intercom/specops
name = "\improper Spec Ops intercom"
frequency = ERT_FREQ
/obj/item/device/radio/intercom/department
canhear_range = 5
broadcasting = 0
listening = 1
/obj/item/device/radio/intercom/department/medbay
name = "station intercom (Medbay)"
frequency = MED_I_FREQ
/obj/item/device/radio/intercom/department/security
name = "station intercom (Security)"
frequency = SEC_I_FREQ
/obj/item/device/radio/intercom/New()
..()
processing_objects += src
/obj/item/device/radio/intercom/department/medbay/New()
..()
internal_channels = default_medbay_channels.Copy()
/obj/item/device/radio/intercom/department/security/New()
..()
internal_channels = list(
num2text(PUB_FREQ) = list(),
num2text(SEC_I_FREQ) = list(access_security)
)
/obj/item/device/radio/intercom/syndicate
name = "illicit intercom"
desc = "Talk through this. Evilly"
frequency = SYND_FREQ
subspace_transmission = 1
syndie = 1
/obj/item/device/radio/intercom/syndicate/New()
..()
internal_channels[num2text(SYND_FREQ)] = list(access_syndicate)
/obj/item/device/radio/intercom/Destroy()
processing_objects -= src
..()
@@ -44,12 +94,6 @@
return canhear_range
/obj/item/device/radio/intercom/hear_talk(mob/M as mob, msg)
if(!src.anyai && !(M in src.ai))
return
..()
/obj/item/device/radio/intercom/process()
if(((world.timeofday - last_tick) > 30) || ((world.timeofday - last_tick) < 0))
last_tick = world.timeofday
@@ -57,8 +101,8 @@
if(!src.loc)
on = 0
else
var/area/A = src.loc.loc
if(!A || !isarea(A))
var/area/A = get_area(src)
if(!A)
on = 0
else
on = A.powered(EQUIP) // set "on" to the power status
@@ -69,8 +113,19 @@
icon_state = "intercom"
/obj/item/device/radio/intercom/locked
freerange = 1
var/locked_frequency
/obj/item/device/radio/intercom/locked/set_frequency()
..(locked_frequency)
/obj/item/device/radio/intercom/locked/set_frequency(var/frequency)
if(frequency == locked_frequency)
..(locked_frequency)
/obj/item/device/radio/intercom/locked/list_channels()
return ""
/obj/item/device/radio/intercom/locked/ai_private
name = "\improper AI intercom"
frequency = AI_FREQ
/obj/item/device/radio/intercom/locked/confessional
name = "confessional intercom"
frequency = 1480
+137 -50
View File
@@ -1,9 +1,32 @@
// Access check is of the type requires one. These have been carefully selected to avoid allowing the janitor to see channels he shouldn't
var/global/list/default_internal_channels = list(
num2text(PUB_FREQ) = list(),
num2text(AI_FREQ) = list(access_synth),
num2text(ERT_FREQ) = list(access_cent_specops),
num2text(COMM_FREQ)= list(access_heads),
num2text(ENG_FREQ) = list(access_engine_equip, access_atmospherics),
num2text(MED_FREQ) = list(access_medical_equip),
num2text(MED_I_FREQ)=list(access_medical_equip),
num2text(SEC_FREQ) = list(access_security),
num2text(SEC_I_FREQ)=list(access_security),
num2text(SCI_FREQ) = list(access_tox,access_robotics,access_xenobiology),
num2text(SUP_FREQ) = list(access_cargo),
num2text(SRV_FREQ) = list(access_janitor, access_hydroponics)
)
var/global/list/default_medbay_channels = list(
num2text(PUB_FREQ) = list(),
num2text(MED_FREQ) = list(access_medical_equip),
num2text(MED_I_FREQ) = list(access_medical_equip)
)
/obj/item/device/radio
icon = 'icons/obj/radio.dmi'
name = "station bounced radio"
suffix = "\[3\]"
icon_state = "walkietalkie"
item_state = "walkietalkie"
var/on = 1 // 0 for off
var/last_transmission
var/frequency = PUB_FREQ //common chat
@@ -14,12 +37,9 @@
var/b_stat = 0
var/broadcasting = 0
var/listening = 1
var/freerange = 0 // 0 - Sanitize frequencies, 1 - Full range
var/list/channels = list() //see communications.dm for full list. First channes is a "default" for :h
var/list/channels = list() //see communications.dm for full list. First channel is a "default" for :h
var/subspace_transmission = 0
var/syndie = 0//Holder to see if it's a syndicate encrpyed radio
var/maxf = 1499
// "Example" = FREQ_LISTENING|FREQ_BROADCASTING
var/syndie = 0//Holder to see if it's a syndicate encrypted radio
flags = CONDUCT
slot_flags = SLOT_BELT
throw_speed = 2
@@ -28,7 +48,7 @@
matter = list("glass" = 25,DEFAULT_WALL_MATERIAL = 75)
var/const/FREQ_LISTENING = 1
var/list/internal_channels
/obj/item/device/radio
var/datum/radio_frequency/radio_connection
@@ -42,6 +62,7 @@
/obj/item/device/radio/New()
..()
wires = new(src)
internal_channels = default_internal_channels.Copy()
/obj/item/device/radio/Destroy()
qdel(wires)
@@ -55,19 +76,15 @@
/obj/item/device/radio/initialize()
if(freerange)
if(frequency < 1200 || frequency > 1600)
frequency = sanitize_frequency(frequency, maxf)
// The max freq is higher than a regular headset to decrease the chance of people listening in, if you use the higher channels.
else if (frequency < 1441 || frequency > maxf)
//world.log << "[src] ([type]) has a frequency of [frequency], sanitizing."
frequency = sanitize_frequency(frequency, maxf)
if(frequency < RADIO_LOW_FREQ || frequency > RADIO_HIGH_FREQ)
frequency = sanitize_frequency(frequency, RADIO_LOW_FREQ, RADIO_HIGH_FREQ)
set_frequency(frequency)
for (var/ch_name in channels)
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
/obj/item/device/radio/attack_ghost(mob/user)
interact(user)
/obj/item/device/radio/attack_self(mob/user as mob)
user.set_machine(src)
@@ -95,13 +112,48 @@
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>
"}
for (var/ch_name in channels)
dat+=text_sec_channel(ch_name, channels[ch_name])
dat+=list_channels(user)
dat+={"[text_wires()]</TT></body></html>"}
user << browse(dat, "window=radio")
onclose(user, "radio")
return
/obj/item/device/radio/proc/list_channels(var/mob/user)
return list_internal_channels(user)
/obj/item/device/radio/proc/list_secure_channels(var/mob/user)
var/dat = ""
for (var/ch_name in channels)
dat+=text_sec_channel(ch_name, channels[ch_name])
return dat
/obj/item/device/radio/proc/list_internal_channels(var/mob/user)
var/dat = ""
for (var/internal_chan in internal_channels)
if(has_channel_access(user, internal_chan))
dat+="<A href='byond://?src=\ref[src];spec_freq=[internal_chan]'>[get_frequency_name(text2num(internal_chan))]</A><br>"
if(dat)
dat = "<br><b>Internal Channels</b><br>" + dat
return dat
/obj/item/device/radio/proc/has_channel_access(var/mob/user, var/freq)
if(!user)
return 0
if(!(freq in internal_channels))
return 0
return user.has_internal_radio_channel_access(internal_channels[freq])
/mob/proc/has_internal_radio_channel_access(var/list/req_one_accesses)
var/obj/item/weapon/card/id/I = GetIdCard()
return has_access(list(), req_one_accesses, I ? I.GetAccess() : list())
/mob/dead/observer/has_internal_radio_channel_access(var/list/req_one_accesses)
return can_admin_interact()
/obj/item/device/radio/proc/text_wires()
if (b_stat)
return wires.GetInteractWindow()
@@ -124,7 +176,7 @@
/obj/item/device/radio/Topic(href, href_list)
if(..() || !on)
usr << browse(null, "window=radio")
return
return 1
usr.set_machine(src)
if (href_list["track"])
@@ -132,20 +184,20 @@
var/mob/living/silicon/ai/A = locate(href_list["track2"])
if(A && target)
A.ai_actual_track(target)
return
. = 1
else if (href_list["freq"])
var/new_frequency = (frequency + text2num(href_list["freq"]))
if (!freerange || (frequency < 1200 || frequency > 1600))
new_frequency = sanitize_frequency(new_frequency, maxf)
if ((new_frequency < PUBLIC_LOW_FREQ || new_frequency > PUBLIC_HIGH_FREQ))
new_frequency = sanitize_frequency(new_frequency)
set_frequency(new_frequency)
if(hidden_uplink)
if(hidden_uplink.check_trigger(usr, frequency, traitor_frequency))
usr << browse(null, "window=radio")
return
. = 1
else if (href_list["talk"])
ToggleBroadcast()
. = 1
else if (href_list["listen"])
var/chan_name = href_list["ch_name"]
if (!chan_name)
@@ -155,11 +207,17 @@
channels[chan_name] &= ~FREQ_LISTENING
else
channels[chan_name] |= FREQ_LISTENING
. = 1
else if(href_list["spec_freq"])
var freq = href_list["spec_freq"]
if(has_channel_access(usr, freq))
set_frequency(text2num(freq))
. = 1
if(href_list["nowindow"]) // here for pAIs, maybe others will want it, idk
return
return 1
interact(usr)
if(.)
interact(usr)
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel) //BS12 EDIT
var/datum/radio_frequency/connection = null
@@ -503,12 +561,19 @@
/obj/item/device/radio/borg
var/mob/living/silicon/robot/myborg = null // Cyborg which owns this radio. Used for power checks
var/obj/item/device/encryptionkey/keyslot = null//Borg radios can handle a single encryption key
var/shut_up = 0
var/shut_up = 1
icon = 'icons/obj/robot_component.dmi' // Cyborgs radio icons should look like the component.
icon_state = "radio"
canhear_range = 3
canhear_range = 0
subspace_transmission = 1
/obj/item/device/radio/borg/Destroy()
myborg = null
return ..()
/obj/item/device/radio/borg/list_channels(var/mob/user)
return list_secure_channels(user)
/obj/item/device/radio/borg/talk_into()
. = ..()
if (isrobot(src.loc))
@@ -590,27 +655,36 @@
return
/obj/item/device/radio/borg/Topic(href, href_list)
if(usr.stat || !on)
return
if(..())
return 1
if (href_list["mode"])
if(subspace_transmission != 1)
subspace_transmission = 1
usr << "Subspace Transmission is enabled"
else
subspace_transmission = 0
usr << "Subspace Transmission is disabled"
if(subspace_transmission == 0)//Simple as fuck, clears the channel list to prevent talking/listening over them if subspace transmission is disabled
channels = list()
else
recalculateChannels()
if (href_list["shutup"]) // Toggle loudspeaker mode, AKA everyone around you hearing your radio.
shut_up = !shut_up
if(shut_up)
canhear_range = 0
else
canhear_range = 3
var/enable_subspace_transmission = text2num(href_list["mode"])
if(enable_subspace_transmission != subspace_transmission)
subspace_transmission = !subspace_transmission
if(subspace_transmission)
usr << "<span class='notice'>Subspace Transmission is enabled</span>"
else
usr << "<span class='notice'>Subspace Transmission is disabled</span>"
..()
if(subspace_transmission == 0)//Simple as fuck, clears the channel list to prevent talking/listening over them if subspace transmission is disabled
channels = list()
else
recalculateChannels()
. = 1
if (href_list["shutup"]) // Toggle loudspeaker mode, AKA everyone around you hearing your radio.
var/do_shut_up = text2num(href_list["shutup"])
if(do_shut_up != shut_up)
shut_up = !shut_up
if(shut_up)
canhear_range = 0
usr << "<span class='notice'>Loadspeaker disabled.</span>"
else
canhear_range = 3
usr << "<span class='notice'>Loadspeaker enabled.</span>"
. = 1
if(.)
interact(usr)
/obj/item/device/radio/borg/interact(mob/user as mob)
if(!on)
@@ -625,13 +699,12 @@
[format_frequency(frequency)]
<A href='byond://?src=\ref[src];freq=2'>+</A>
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>
<A href='byond://?src=\ref[src];mode=1'>Toggle Broadcast Mode</A><BR>
Loudspeaker: [shut_up ? "<A href='byond://?src=\ref[src];shutup=0'>Disengaged</A>" : "<A href='byond://?src=\ref[src];shutup=1'>Engaged</A>"]<BR>
Broadcasting: [subspace_transmission ? "<A href='byond://?src=\ref[src];mode=0'>Disable</A>" : "<A href='byond://?src=\ref[src];mode=1'>Enable</A>"]<BR>
Loudspeaker: [shut_up ? "<A href='byond://?src=\ref[src];shutup=0'>Enable</A>" : "<A href='byond://?src=\ref[src];shutup=1'>Disable</A>"]<BR>
"}
if(subspace_transmission)//Don't even bother if subspace isn't turned on
for (var/ch_name in channels)
dat+=text_sec_channel(ch_name, channels[ch_name])
dat+=list_channels(user)
dat+={"[text_wires()]</TT></body></html>"}
user << browse(dat, "window=radio")
onclose(user, "radio")
@@ -650,3 +723,17 @@
/obj/item/device/radio/off
listening = 0
/obj/item/device/radio/phone
broadcasting = 0
icon = 'icons/obj/items.dmi'
icon_state = "red_phone"
listening = 1
name = "phone"
/obj/item/device/radio/phone/medbay
frequency = MED_I_FREQ
/obj/item/device/radio/phone/medbay/New()
..()
internal_channels = default_medbay_channels.Copy()
+1 -1
View File
@@ -8,7 +8,7 @@
w_class = 2
item_state = "electronic"
matter = list(DEFAULT_WALL_MATERIAL = 150)
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINERING = 1)
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1)
var/scan_range = 1
@@ -365,10 +365,10 @@ datum/uplink_item/dd_SortValue()
item_cost = 7
path = /obj/item/weapon/aiModule/syndicate
/datum/uplink_item/item/tools/singularity_beacon
name = "Singularity Beacon (DANGER!)"
/datum/uplink_item/item/tools/supply_beacon
name = "Hacked Supply Beacon (DANGER!)"
item_cost = 7
path = /obj/item/device/radio/beacon/syndicate
path = /obj/item/supply_beacon
/datum/uplink_item/item/tools/teleporter
name = "Teleporter Circuit Board"
@@ -622,7 +622,7 @@ var/image/default_abstract_uplink_icon
if(!user)
return 0
var/obj/item/weapon/card/id/I = GetIdCard(user)
var/obj/item/weapon/card/id/I = user.GetIdCard()
var/datum/data/record/random_general_record
var/datum/data/record/random_medical_record
if(data_core.general.len)
+2 -2
View File
@@ -33,12 +33,12 @@ obj/item/device/hailer/attack_self(mob/living/carbon/user as mob)
if(isnull(insults))
playsound(get_turf(src), 'sound/voice/halt.ogg', 100, 1, vary = 0)
user.show_message("<span class='warning'>[user]'s [name] rasps, \"[use_message]\"</span>",1)
user.audible_message("<span class='warning'>[user]'s [name] rasps, \"[use_message]\"</span>", "<span class='warning'>\The [user] holds up \the [name].</span>")
else
if(insults > 0)
playsound(get_turf(src), 'sound/voice/binsult.ogg', 100, 1, vary = 0)
// Yes, it used to show the transcription of the sound clip. That was a) inaccurate b) immature as shit.
user.show_message("<span class='warning'>[user]'s [name] gurgles something indecipherable and deeply offensive.</span>")
user.audible_message("<span class='warning'>[user]'s [name] gurgles something indecipherable and deeply offensive.</span>", "<span class='warning'>\The [user] holds up \the [name].</span>")
insults--
else
user << "<span class='danger'>*BZZZZZZZZT*</span>"
@@ -5,8 +5,6 @@
icon_state = "blank"
flags = CONDUCT
slot_flags = SLOT_BELT
var/construction_time = 100
var/list/construction_cost = list(DEFAULT_WALL_MATERIAL=20000,"glass"=5000)
var/list/part = null // Order of args is important for installing robolimbs.
var/sabotaged = 0 //Emagging limbs can have repercussions when installed as prosthetics.
var/model_info
@@ -32,8 +30,6 @@
name = "left arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "l_arm"
construction_time = 200
construction_cost = list(DEFAULT_WALL_MATERIAL=18000)
part = list("l_arm","l_hand")
model_info = 1
@@ -41,8 +37,6 @@
name = "right arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "r_arm"
construction_time = 200
construction_cost = list(DEFAULT_WALL_MATERIAL=18000)
part = list("r_arm","r_hand")
model_info = 1
@@ -50,8 +44,6 @@
name = "left leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "l_leg"
construction_time = 200
construction_cost = list(DEFAULT_WALL_MATERIAL=15000)
part = list("l_leg","l_foot")
model_info = 1
@@ -59,8 +51,6 @@
name = "right leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "r_leg"
construction_time = 200
construction_cost = list(DEFAULT_WALL_MATERIAL=15000)
part = list("r_leg","r_foot")
model_info = 1
@@ -69,8 +59,6 @@
desc = "A heavily reinforced case containing cyborg logic boards, with space for a standard power cell."
icon_state = "chest"
part = list("groin","chest")
construction_time = 350
construction_cost = list(DEFAULT_WALL_MATERIAL=40000)
var/wires = 0.0
var/obj/item/weapon/cell/cell = null
@@ -79,8 +67,6 @@
desc = "A standard reinforced braincase, with spine-plugged neural socket and sensor gimbals."
icon_state = "head"
part = list("head")
construction_time = 350
construction_cost = list(DEFAULT_WALL_MATERIAL=25000)
var/obj/item/device/flash/flash1 = null
var/obj/item/device/flash/flash2 = null
@@ -88,8 +74,6 @@
name = "endoskeleton"
desc = "A complex metal backbone with standard limb sockets and pseudomuscle anchors."
icon_state = "robo_suit"
construction_time = 500
construction_cost = list(DEFAULT_WALL_MATERIAL=50000)
var/obj/item/robot_parts/l_arm/l_arm = null
var/obj/item/robot_parts/r_arm/r_arm = null
var/obj/item/robot_parts/l_leg/l_leg = null
@@ -213,10 +197,6 @@
user << "<span class='warning'>Sticking a dead [W] into the frame would sort of defeat the purpose.</span>"
return
if(M.brainmob.mind in revs.head_revolutionaries)
user << "<span class='warning'>The frame's firmware lets out a shrill sound, and flashes 'Abnormal Memory Engram'. It refuses to accept the [W].</span>"
return
if(jobban_isbanned(M.brainmob, "Cyborg"))
user << "<span class='warning'>This [W] does not seem to fit.</span>"
return
@@ -6,8 +6,6 @@
desc = "Protected by FRM."
icon = 'icons/obj/module.dmi'
icon_state = "cyborg_upgrade"
var/construction_time = 120
var/construction_cost = list(DEFAULT_WALL_MATERIAL=10000)
var/locked = 0
var/require_module = 0
var/installed = 0
@@ -31,10 +29,10 @@
R.modtype = initial(R.modtype)
R.hands.icon_state = initial(R.hands.icon_state)
R.choose_icon(1, R.set_module_sprites(list("Default" = "robot")))
R.notify_ai(ROBOT_NOTIFICATION_MODULE_RESET, R.module.name)
R.module.Reset(R)
qdel(R.module)
R.module = null
R.updatename("Default")
return 1
@@ -43,7 +41,6 @@
name = "robot reclassification board"
desc = "Used to rename a cyborg."
icon_state = "cyborg_upgrade1"
construction_cost = list(DEFAULT_WALL_MATERIAL=35000)
var/heldname = "default name"
/obj/item/borg/upgrade/rename/attack_self(mob/user as mob)
@@ -61,7 +58,6 @@
/obj/item/borg/upgrade/restart
name = "robot emergency restart module"
desc = "Used to force a restart of a disabled-but-repaired robot, bringing it back online."
construction_cost = list(DEFAULT_WALL_MATERIAL=60000 , "glass"=5000)
icon_state = "cyborg_upgrade1"
@@ -85,7 +81,6 @@
/obj/item/borg/upgrade/vtec
name = "robotic VTEC Module"
desc = "Used to kick in a robot's VTEC systems, increasing their speed."
construction_cost = list(DEFAULT_WALL_MATERIAL=80000 , "glass"=6000 , "gold"= 5000)
icon_state = "cyborg_upgrade2"
require_module = 1
@@ -102,7 +97,6 @@
/obj/item/borg/upgrade/tasercooler
name = "robotic Rapid Taser Cooling Module"
desc = "Used to cool a mounted taser, increasing the potential current in it and thus its recharge rate."
construction_cost = list(DEFAULT_WALL_MATERIAL=80000 , "glass"=6000 , "gold"= 2000, "diamond" = 500)
icon_state = "cyborg_upgrade3"
require_module = 1
@@ -137,7 +131,6 @@
/obj/item/borg/upgrade/jetpack
name = "mining robot jetpack"
desc = "A carbon dioxide jetpack suitable for low-gravity mining operations."
construction_cost = list(DEFAULT_WALL_MATERIAL=10000,"phoron"=15000,"uranium" = 20000)
icon_state = "cyborg_upgrade3"
require_module = 1
@@ -159,7 +152,6 @@
/obj/item/borg/upgrade/syndicate/
name = "illegal equipment module"
desc = "Unlocks the hidden, deadlier functions of a robot"
construction_cost = list(DEFAULT_WALL_MATERIAL=10000,"glass"=15000,"diamond" = 10000)
icon_state = "cyborg_upgrade3"
require_module = 1
+3 -5
View File
@@ -184,11 +184,9 @@
if(!uses_charge)
amount -= used
if (amount <= 0)
spawn(0) //delete the empty stack once the current context yields
if (amount <= 0) //check again in case someone transferred stuff to us
if(usr)
usr.remove_from_mob(src)
qdel(src)
if(usr)
usr.remove_from_mob(src)
qdel(src) //should be safe to qdel immediately since if someone is still using this stack it will persist for a little while longer
return 1
else
if(get_amount() < used)
-81
View File
@@ -133,87 +133,6 @@
icon = 'icons/obj/singularity.dmi'
icon_state = "singularity_s1"
/*
* Toy gun: Why isnt this an /obj/item/weapon/gun?
*/
/obj/item/toy/gun
name = "cap gun"
desc = "There are 0 caps left. Looks almost like the real thing! Ages 8 and up. Please recycle in an autolathe when you're out of caps!"
icon = 'icons/obj/gun.dmi'
icon_state = "revolver"
item_state = "revolver"
item_icons = list(
icon_l_hand = 'icons/mob/items/lefthand_guns.dmi',
icon_r_hand = 'icons/mob/items/righthand_guns.dmi',
)
flags = CONDUCT
slot_flags = SLOT_BELT|SLOT_HOLSTER
w_class = 3.0
matter = list("glass" = 10,DEFAULT_WALL_MATERIAL = 10)
attack_verb = list("struck", "pistol whipped", "hit", "bashed")
var/bullets = 7.0
examine(mob/user)
if(..(user, 0))
src.desc = text("There are [] caps\s left. Looks almost like the real thing! Ages 8 and up.", src.bullets)
return
attackby(obj/item/toy/ammo/gun/A as obj, mob/user as mob)
if (istype(A, /obj/item/toy/ammo/gun))
if (src.bullets >= 7)
user << "<span class='notice'>It's already fully loaded!</span>"
return 1
if (A.amount_left <= 0)
user << "<span class='warning'>There is no more caps!</span>"
return 1
if (A.amount_left < (7 - src.bullets))
src.bullets += A.amount_left
user << text("<span class='warning'>You reload [] caps\s!</span>", A.amount_left)
A.amount_left = 0
else
user << text("<span class='warning'>You reload [] caps\s!</span>", 7 - src.bullets)
A.amount_left -= 7 - src.bullets
src.bullets = 7
A.update_icon()
return 1
return
afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
if (flag)
return
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
usr << "<span class='warning'>You don't have the dexterity to do this!</span>"
return
src.add_fingerprint(user)
if (src.bullets < 1)
user.show_message("<span class='warning'>*click* *click*</span>", 2)
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
return
playsound(user, 'sound/weapons/Gunshot.ogg', 100, 1)
src.bullets--
for(var/mob/O in viewers(user, null))
O.show_message(text("<span class='danger'>\The [] fires a cap gun at []!</span>", user, target), 1, "<span class='warning'>You hear a gunshot!</span>", 2)
/obj/item/toy/ammo/gun
name = "ammo-caps"
desc = "There are 7 caps left! Make sure to recyle the box in an autolathe when it gets empty."
icon = 'icons/obj/ammo.dmi'
icon_state = "357-7"
flags = CONDUCT
w_class = 1.0
matter = list(DEFAULT_WALL_MATERIAL = 10,"glass" = 10)
var/amount_left = 7.0
update_icon()
src.icon_state = text("357-[]", src.amount_left)
src.desc = text("There are [] caps\s left! Make sure to recycle the box in an autolathe when it gets empty.", src.amount_left)
return
/*
* Toy crossbow
*/
+37 -16
View File
@@ -93,6 +93,11 @@
desc = "A card used to provide ID and determine access across the station."
icon_state = "id"
item_state = "card-id"
sprite_sheets = list(
"Resomi" = 'icons/mob/species/resomi/id.dmi'
)
var/access = list()
var/registered_name = "Unknown" // The name registered_name on the card
slot_flags = SLOT_ID
@@ -122,8 +127,9 @@
return 0
/obj/item/weapon/card/id/proc/show(mob/user as mob)
user << browse_rsc(front, "front.png")
user << browse_rsc(side, "side.png")
if(front && side)
user << browse_rsc(front, "front.png")
user << browse_rsc(side, "side.png")
var/datum/browser/popup = new(user, "idcard", name, 600, 250)
popup.set_content(dat())
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
@@ -137,17 +143,21 @@
front = getFlatIcon(M, SOUTH, always_use_defdir = 1)
side = getFlatIcon(M, WEST, always_use_defdir = 1)
/obj/item/weapon/card/id/proc/set_owner_info(var/mob/living/carbon/human/H)
if(!H || !H.dna)
return
age = H.age
blood_type = H.dna.b_type
dna_hash = H.dna.unique_enzymes
fingerprint_hash = md5(H.dna.uni_identity)
registered_name = H.real_name
sex = capitalize(H.gender)
set_id_photo(H)
update_name()
/mob/proc/set_id_info(var/obj/item/weapon/card/id/id_card)
id_card.age = 0
id_card.registered_name = real_name
id_card.sex = capitalize(gender)
id_card.set_id_photo(src)
if(dna)
id_card.blood_type = dna.b_type
id_card.dna_hash = dna.unique_enzymes
id_card.fingerprint_hash= md5(dna.uni_identity)
id_card.update_name()
/mob/living/carbon/human/set_id_info(var/obj/item/weapon/card/id/id_card)
..()
id_card.age = age
/obj/item/weapon/card/id/proc/dat()
var/dat = ("<table><tr><td>")
@@ -213,9 +223,20 @@
item_state = "gold_id"
registered_name = "Captain"
assignment = "Captain"
New()
access = get_all_station_access()
..()
/obj/item/weapon/card/id/captains_spare/New()
access = get_all_station_access()
..()
/obj/item/weapon/card/id/synthetic
name = "\improper Synthetic ID"
desc = "Access module for NanoTrasen Synthetics"
icon_state = "id-robot"
item_state = "tdgreen"
assignment = "Synthetic"
/obj/item/weapon/card/id/synthetic/New()
access = get_all_station_access() + access_synth
..()
/obj/item/weapon/card/id/centcom
name = "\improper CentCom. ID"
@@ -6,12 +6,11 @@ var/global/list/syndicate_ids = list()
origin_tech = list(TECH_ILLEGAL = 3)
var/electronic_warfare = 1
var/registered_user = null
var/list/initial_access = list(access_maint_tunnels, access_syndicate, access_external_airlocks)
/obj/item/weapon/card/id/syndicate/New(mob/user as mob)
syndicate_ids += src
..()
access = initial_access.Copy()
access = syndicate_access.Copy()
/obj/item/weapon/card/id/syndicate/Destroy()
syndicate_ids -= src
@@ -39,8 +38,8 @@ var/global/list/syndicate_ids = list()
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
if(!registered_user)
registered_user = user
set_owner_info(user)
user << "<span class='notice'>The microscanner marks you as its owner, preventing others some accessing its internals.</span>"
user.set_id_info(src)
user << "<span class='notice'>The microscanner marks you as its owner, preventing others from accessing its internals.</span>"
if(registered_user == user)
switch(alert("Would you like edit the ID, or show it?","Show or Edit?", "Edit","Show"))
if("Edit")
@@ -163,7 +162,7 @@ var/global/list/syndicate_ids = list()
if("Factory Reset")
if(alert("This will factory reset the card, including access and owner. Continue?", "Factory Reset", "No", "Yes") == "Yes" && CanUseTopic(user, state))
age = initial(age)
access = initial_access.Copy()
access = syndicate_access.Copy()
assignment = initial(assignment)
blood_type = initial(blood_type)
dna_hash = initial(dna_hash)
@@ -84,7 +84,7 @@
/obj/item/toy/balloon,
/obj/item/toy/blink,
/obj/item/toy/crossbow,
/obj/item/toy/gun,
/obj/item/weapon/gun/projectile/revolver/capgun,
/obj/item/toy/katana,
/obj/item/toy/prize/deathripley,
/obj/item/toy/prize/durand,
@@ -16,6 +16,7 @@
var/breakouttime = 1200 //Deciseconds = 120s = 2 minutes
var/cuff_sound = 'sound/weapons/handcuffs.ogg'
var/cuff_type = "handcuffs"
sprite_sheets = list("Resomi" = 'icons/mob/species/resomi/handcuffs.dmi')
/obj/item/weapon/handcuffs/attack(var/mob/living/carbon/C, var/mob/living/user)
@@ -62,8 +62,7 @@
/obj/item/weapon/material/shard/Crossed(AM as mob|obj)
..()
if(ismob(AM))
if(isliving(AM))
var/mob/M = AM
if(M.buckled) //wheelchairs, office chairs, rollerbeds
@@ -11,8 +11,13 @@
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
/obj/item/weapon/material/sword/IsShield()
return 1
/obj/item/weapon/material/sword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
if(default_parry_check(user, attacker, damage_source) && prob(50))
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
playsound(user.loc, 'sound/weapons/punchmiss.ogg', 50, 1)
return 1
return 0
/obj/item/weapon/material/sword/suicide_act(mob/user)
viewers(user) << "<span class='danger'>[user] is falling on the [src.name]! It looks like \he's trying to commit suicide.</span>"
@@ -71,6 +71,14 @@
O.unwield()
return unwield()
//Allow a small chance of parrying melee attacks when wielded - maybe generalize this to other weapons someday
/obj/item/weapon/material/twohanded/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
if(wielded && default_parry_check(user, attacker, damage_source) && prob(15))
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
playsound(user.loc, 'sound/weapons/punchmiss.ogg', 50, 1)
return 1
return 0
/obj/item/weapon/material/twohanded/update_icon()
icon_state = "[base_icon][wielded]"
item_state = icon_state
@@ -167,51 +175,7 @@
else if(istype(A,/obj/effect/plant))
var/obj/effect/plant/P = A
P.die_off()
/*
/*
* Double-Bladed Energy Swords - Cheridan
*/
// Not sure what to do with this one, it won't work nicely with the material system,
// but I don't want to copypaste all the twohanded procs..
/obj/item/weapon/material/twohanded/dualsaber
icon_state = "dualsaber0"
base_icon = "dualsaber"
name = "double-bladed energy sword"
desc = "Handle with care."
force = 3
throwforce = 5.0
throw_speed = 1
throw_range = 5
w_class = 2.0
force_wielded = 30
wieldsound = 'sound/weapons/saberon.ogg'
unwieldsound = 'sound/weapons/saberoff.ogg'
origin_tech = list(TECH_MAGNET = 3, TECH_ILLEGAL = 4)
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharp = 1
edge = 1
applies_material_colour = 0
/obj/item/weapon/material/twohanded/dualsaber/attack(target as mob, mob/living/user as mob)
..()
if((CLUMSY in user.mutations) && (wielded) &&prob(40))
user << "<span class='danger'>You twirl around a bit before losing your balance and impaling yourself on \the [src].</span>"
user.take_organ_damage(20,25)
return
if((wielded) && prob(50))
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2))
user.set_dir(i)
sleep(1)
/obj/item/weapon/material/twohanded/dualsaber/IsShield()
if(wielded)
return 1
else
return 0
*/
//spears, bay edition
/obj/item/weapon/material/twohanded/spear
icon_state = "spearglass0"
@@ -151,8 +151,14 @@
attack_verb = list()
icon_state = initial(icon_state)
/obj/item/weapon/melee/energy/sword/IsShield()
if(active)
/obj/item/weapon/melee/energy/sword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
if(active && default_parry_check(user, attacker, damage_source) && prob(50))
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
return 1
return 0
@@ -14,8 +14,6 @@
var/maxcharge = 1000
var/rigged = 0 // true if rigged to explode
var/minor_fault = 0 //If not 100% reliable, it will build up faults.
var/construction_cost = list(DEFAULT_WALL_MATERIAL=750,"glass"=75)
var/construction_time=100
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 50)
suicide_act(mob/user)
@@ -83,7 +81,6 @@
icon_state = "scell"
maxcharge = 20000
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 70)
construction_cost = list(DEFAULT_WALL_MATERIAL=750,"glass"=100)
/obj/item/weapon/cell/super/empty/New()
..()
@@ -95,7 +92,6 @@
icon_state = "hpcell"
maxcharge = 30000
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 80)
construction_cost = list(DEFAULT_WALL_MATERIAL=500,"glass"=150,"gold"=200,"silver"=200)
/obj/item/weapon/cell/hyper/empty/New()
..()
+86 -16
View File
@@ -1,5 +1,52 @@
//** Shield Helpers
//These are shared by various items that have shield-like behaviour
//bad_arc is the ABSOLUTE arc of directions from which we cannot block. If you want to fix it to e.g. the user's facing you will need to rotate the dirs yourself.
/proc/check_shield_arc(mob/user, var/bad_arc, atom/damage_source = null, mob/attacker = null)
//check attack direction
var/attack_dir = 0 //direction from the user to the source of the attack
if(istype(damage_source, /obj/item/projectile))
var/obj/item/projectile/P = damage_source
attack_dir = get_dir(get_turf(user), P.starting)
else if(attacker)
attack_dir = get_dir(get_turf(user), get_turf(attacker))
else if(damage_source)
attack_dir = get_dir(get_turf(user), get_turf(damage_source))
if(!(attack_dir && (attack_dir & bad_arc)))
return 1
return 0
/proc/default_parry_check(mob/user, mob/attacker, atom/damage_source)
//parry only melee attacks
if(istype(damage_source, /obj/item/projectile) || (attacker && get_dist(user, attacker) > 1) || user.incapacitated())
return 0
//block as long as they are not directly behind us
var/bad_arc = reverse_direction(user.dir) //arc of directions from which we cannot block
if(!check_shield_arc(user, bad_arc, damage_source, attacker))
return 0
return 1
/obj/item/weapon/shield
name = "shield"
var/base_block_chance = 50
/obj/item/weapon/shield/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
if(user.incapacitated())
return 0
//block as long as they are not directly behind us
var/bad_arc = reverse_direction(user.dir) //arc of directions from which we cannot block
if(check_shield_arc(user, bad_arc, damage_source, attacker))
if(prob(get_block_chance(user, damage, damage_source, attacker)))
user.visible_message("<span class='danger'>\The [user] blocks [attack_text] with \the [src]!</span>")
return 1
return 0
/obj/item/weapon/shield/proc/get_block_chance(mob/user, var/damage, atom/damage_source = null, mob/attacker = null)
return base_block_chance
/obj/item/weapon/shield/riot
name = "riot shield"
@@ -18,17 +65,26 @@
attack_verb = list("shoved", "bashed")
var/cooldown = 0 //shield bash cooldown. based on world.time
IsShield()
return 1
/obj/item/weapon/shield/riot/handle_shield(mob/user)
. = ..()
if(.) playsound(user.loc, 'sound/weapons/Genhit.ogg', 50, 1)
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/melee/baton))
if(cooldown < world.time - 25)
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
cooldown = world.time
else
..()
/obj/item/weapon/shield/riot/get_block_chance(mob/user, var/damage, atom/damage_source = null, mob/attacker = null)
if(istype(damage_source, /obj/item/projectile))
var/obj/item/projectile/P = damage_source
//plastic shields do not stop bullets or lasers, even in space. Will block beanbags, rubber bullets, and stunshots just fine though.
if((is_sharp(P) && damage > 10) || istype(P, /obj/item/projectile/beam))
return 0
return base_block_chance
/obj/item/weapon/shield/riot/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/melee/baton))
if(cooldown < world.time - 25)
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
cooldown = world.time
else
..()
/*
* Energy Shield
@@ -49,11 +105,23 @@
attack_verb = list("shoved", "bashed")
var/active = 0
/obj/item/weapon/shield/energy/IsShield()
if(active)
return 1
else
return 0
/obj/item/weapon/shield/energy/handle_shield(mob/user)
if(!active)
return 0 //turn it on first!
. = ..()
if(.)
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
/obj/item/weapon/shield/energy/get_block_chance(mob/user, var/damage, atom/damage_source = null, mob/attacker = null)
if(istype(damage_source, /obj/item/projectile))
var/obj/item/projectile/P = damage_source
if((is_sharp(P) && damage > 10) || istype(P, /obj/item/projectile/beam))
return (base_block_chance - round(damage / 3)) //block bullets and beams using the old block chance
return base_block_chance
/obj/item/weapon/shield/energy/attack_self(mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
@@ -82,9 +150,10 @@
add_fingerprint(user)
return
/obj/item/weapon/cloaking_device
name = "cloaking device"
desc = "Use this to become invisible to the human eyesocket."
desc = "Use this to become invisible to the human eye."
icon = 'icons/obj/device.dmi'
icon_state = "shield0"
var/active = 0.0
@@ -114,3 +183,4 @@
if(ismob(loc))
loc:update_icons()
..()
@@ -17,6 +17,9 @@
slot_l_hand_str = "backpack",
slot_r_hand_str = "backpack",
)
sprite_sheets = list(
"Resomi" = 'icons/mob/species/resomi/back.dmi'
)
w_class = 4
slot_flags = SLOT_BACK
max_w_class = 3
@@ -6,7 +6,7 @@
item_state = "utility"
slot_flags = SLOT_BELT
attack_verb = list("whipped", "lashed", "disciplined")
sprite_sheets = list("Resomi" = 'icons/mob/species/resomi/belt.dmi')
/obj/item/weapon/storage/update_icon()
if (ismob(src.loc))
@@ -224,6 +224,9 @@
//Set the stop_messages to stop it from printing messages
/obj/item/weapon/storage/proc/can_be_inserted(obj/item/W as obj, stop_messages = 0)
if(!istype(W)) return //Not an item
if(!usr.canUnEquip(W))
return 0
if(src.loc == W)
return 0 //Means the item is already in the storage item
@@ -15,6 +15,10 @@
throw_speed = 1
throw_range = 4
sprite_sheets = list(
"Resomi" = 'icons/mob/species/resomi/back.dmi'
)
var/datum/gas_mixture/air_contents = null
var/distribute_pressure = ONE_ATMOSPHERE
var/integrity = 3
+13 -1
View File
@@ -33,9 +33,21 @@
CouldNotUseTopic(usr)
return 1
/obj/CanUseTopic(var/mob/user, var/datum/topic_state/state)
if(user.CanUseObjTopic(src))
return ..()
user << "<span class='danger'>\icon[src]Access Denied!</span>"
return STATUS_CLOSE
/mob/living/silicon/CanUseObjTopic(var/obj/O)
return O.allowed(src)
/mob/proc/CanUseObjTopic()
return 1
/obj/proc/CouldUseTopic(var/mob/user)
var/atom/host = nano_host()
host.add_fingerprint(user)
host.add_hiddenprint(user)
/obj/proc/CouldNotUseTopic(var/mob/user)
// Nada
+2 -2
View File
@@ -4,7 +4,7 @@
icon = 'icons/obj/coatrack.dmi'
icon_state = "coatrack0"
var/obj/item/clothing/suit/coat
var/list/allowed = list(/obj/item/clothing/suit/storage/toggle/labcoat, /obj/item/clothing/suit/storage/det_suit)
var/list/allowed = list(/obj/item/clothing/suit/storage/toggle/labcoat, /obj/item/clothing/suit/storage/det_trench)
/obj/structure/coatrack/attack_hand(mob/user as mob)
user.visible_message("[user] takes [coat] off \the [src].", "You take [coat] off the \the [src]")
@@ -48,5 +48,5 @@
overlays += image(icon, icon_state = "coat_lab")
if (istype(coat, /obj/item/clothing/suit/storage/toggle/labcoat/cmo))
overlays += image(icon, icon_state = "coat_cmo")
if (istype(coat, /obj/item/clothing/suit/storage/det_suit))
if (istype(coat, /obj/item/clothing/suit/storage/det_trench))
overlays += image(icon, icon_state = "coat_det")
@@ -210,6 +210,7 @@
if(istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
src.MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
return 0
if(istype(W,/obj/item/tk_grab))
return 0
if(istype(W, /obj/item/weapon/weldingtool))
@@ -257,11 +258,9 @@
return
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis)
return
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)))
if((!( istype(O, /atom/movable) ) || O.anchored || !Adjacent(user) || !Adjacent(O) || !user.Adjacent(O) || user.contents.Find(src)))
return
if(user.loc==null) // just in case someone manages to get a closet into the blue light dimension, as unlikely as that seems
return
if(!istype(user.loc, /turf)) // are you in a container/closet/pod/etc?
if(!isturf(user.loc)) // are you in a container/closet/pod/etc?
return
if(!src.opened)
return
@@ -246,16 +246,16 @@
New()
..()
new /obj/item/clothing/under/det(src)
new /obj/item/clothing/under/det/grey(src)
new /obj/item/clothing/under/det/black(src)
new /obj/item/clothing/under/det/slob(src)
new /obj/item/clothing/suit/storage/det_suit(src)
new /obj/item/clothing/suit/storage/det_suit/black(src)
new /obj/item/clothing/suit/storage/det_trench(src)
new /obj/item/clothing/suit/storage/det_trench/grey(src)
new /obj/item/clothing/suit/storage/forensics/blue(src)
new /obj/item/clothing/suit/storage/forensics/red(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/head/det_hat(src)
new /obj/item/clothing/head/det_hat/black(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/clothing/head/det(src)
new /obj/item/clothing/head/det/grey(src)
new /obj/item/clothing/shoes/laceup(src)
new /obj/item/weapon/storage/box/evidence(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/device/detective_scanner(src)
+81 -87
View File
@@ -7,6 +7,7 @@
var/health = 200
var/cover = 50 //how much cover the girder provides against projectiles.
var/material/reinf_material
var/reinforcing = 0
/obj/structure/girder/displaced
icon_state = "displaced"
@@ -48,6 +49,7 @@
health = min(health,initial(health))
state = 0
icon_state = initial(icon_state)
reinforcing = 0
if(reinf_material)
reinforce_girder()
@@ -78,13 +80,18 @@
user << "<span class='notice'>You drill through the girder!</span>"
dismantle()
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user << "<span class='notice'>Now unsecuring support struts...</span>"
if(do_after(user,40))
if(!src) return
user << "<span class='notice'>You unsecured the support struts!</span>"
state = 1
else if(istype(W, /obj/item/weapon/screwdriver))
if(state == 2)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user << "<span class='notice'>Now unsecuring support struts...</span>"
if(do_after(user,40))
if(!src) return
user << "<span class='notice'>You unsecured the support struts!</span>"
state = 1
else if(anchored && !reinf_material)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
reinforcing = !reinforcing
user << "<span class='notice'>\The [src] can now be [reinforcing? "reinforced" : "constructed"]!</span>"
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
@@ -108,95 +115,82 @@
cover = 25
else if(istype(W, /obj/item/stack/material))
var/obj/item/stack/S = W
if(S.get_amount() < 2)
return ..()
var/material/M = S.get_material()
if(!istype(M))
return ..()
var/wall_fake
add_hiddenprint(usr)
if(M.integrity < 50)
user << "<span class='notice'>This material is too soft for use in wall construction.</span>"
return
user << "<span class='notice'>You begin adding the plating...</span>"
if(!do_after(user,40) || !S.use(2))
return
if(anchored)
user << "<span class='notice'>You added the plating!</span>"
if(reinforcing && !reinf_material)
if(!reinforce_with_material(W, user))
return ..()
else
user << "<span class='notice'>You create a false wall! Push on it to open or close the passage.</span>"
wall_fake = 1
if(!construct_wall(W, user))
return ..()
var/turf/Tsrc = get_turf(src)
Tsrc.ChangeTurf(/turf/simulated/wall)
var/turf/simulated/wall/T = get_turf(src)
T.set_material(M, reinf_material)
if(wall_fake)
T.can_open = 1
T.add_hiddenprint(usr)
qdel(src)
return
else if(istype(W, /obj/item/pipe))
var/obj/item/pipe/P = W
if (P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds.
user.drop_item()
P.loc = src.loc
user << "<span class='notice'>You fit the pipe into the [src]!</span>"
else
..()
return ..()
/obj/structure/girder/proc/construct_wall(obj/item/stack/material/S, mob/user)
if(S.get_amount() < 2)
user << "<span class='notice'>There isn't enough material here to construct a wall.</span>"
return 0
var/material/M = name_to_material[S.default_type]
if(!istype(M))
return 0
var/wall_fake
add_hiddenprint(usr)
if(M.integrity < 50)
user << "<span class='notice'>This material is too soft for use in wall construction.</span>"
return 0
user << "<span class='notice'>You begin adding the plating...</span>"
if(!do_after(user,40) || !S.use(2))
return 1 //once we've gotten this far don't call parent attackby()
if(anchored)
user << "<span class='notice'>You added the plating!</span>"
else
user << "<span class='notice'>You create a false wall! Push on it to open or close the passage.</span>"
wall_fake = 1
var/turf/Tsrc = get_turf(src)
Tsrc.ChangeTurf(/turf/simulated/wall)
var/turf/simulated/wall/T = get_turf(src)
T.set_material(M, reinf_material)
if(wall_fake)
T.can_open = 1
T.add_hiddenprint(usr)
qdel(src)
return 1
/obj/structure/girder/proc/reinforce_with_material(obj/item/stack/material/S, mob/user) //if the verb is removed this can be renamed.
if(reinf_material)
user << "<span class='notice'>\The [src] is already reinforced.</span>"
return 0
if(S.get_amount() < 2)
user << "<span class='notice'>There isn't enough material here to reinforce the girder.</span>"
return 0
var/material/M = name_to_material[S.default_type]
if(!istype(M) || M.integrity < 50)
user << "You cannot reinforce \the [src] with that; it is too soft."
return 0
user << "<span class='notice'>Now reinforcing...</span>"
if (!do_after(user,40) || !S.use(2))
return 1 //don't call parent attackby() past this point
user << "<span class='notice'>You added reinforcement!</span>"
reinf_material = M
reinforce_girder()
return 1
/obj/structure/girder/proc/reinforce_girder()
cover = reinf_material.hardness
health = 500
state = 2
icon_state = "reinforced"
/obj/structure/girder/verb/reinforce_with_material()
set name = "Reinforce girder"
set desc = "Reinforce a girder with metal."
set src in view(1)
var/mob/living/user = usr
if(!istype(user) || !(user.l_hand || user.r_hand))
return
if(reinf_material)
user << "\The [src] is already reinforced."
return
var/obj/item/stack/material/S = user.l_hand
if(!istype(S))
S = user.r_hand
if(!istype(S))
user << "You cannot plate \the [src] with that."
return
if(S.get_amount() < 2)
user << "There is not enough material here to reinforce the girder."
return
var/material/M = S.get_material()
if(!istype(M) || M.integrity < 50)
user << "You cannot reinforce \the [src] with that; it is too soft."
return
user << "<span class='notice'>Now reinforcing...</span>"
if (!do_after(user,40) || !S.use(2))
return
user << "<span class='notice'>You added reinforcement!</span>"
reinf_material = M
reinforce_girder()
reinforcing = 0
/obj/structure/girder/proc/dismantle()
new /obj/item/stack/material/steel(get_turf(src))
+1 -2
View File
@@ -11,8 +11,7 @@
/obj/structure/lattice/New()
..()
///// Z-Level Stuff
if(!(istype(src.loc, /turf/space) || istype(src.loc, /turf/simulated/floor/open) || istype(src.loc, /turf/simulated/floor/asteroid)))
///// Z-Level Stuff
if(!(istype(src.loc, /turf/space) || istype(src.loc, /turf/simulated/floor/open) || istype(src.loc, /turf/simulated/floor/asteroid)))///// Z-Level Stuff
qdel(src)
for(var/obj/structure/lattice/LAT in src.loc)
if(LAT != src)
+23 -29
View File
@@ -129,6 +129,7 @@
var/watertemp = "normal" //freezing, normal, or boiling
var/mobpresent = 0 //true if there is a mob on the shower's loc, this is to ease process()
var/is_washing = 0
var/list/temperature_settings = list("normal" = 310, "boiling" = T0C+100, "freezing" = T0C)
/obj/machinery/shower/New()
..()
@@ -150,7 +151,7 @@
if(on)
if (M.loc == loc)
wash(M)
check_heat(M)
process_heat(M)
for (var/atom/movable/G in src.loc)
G.clean_blood()
@@ -158,15 +159,11 @@
if(I.type == /obj/item/device/analyzer)
user << "<span class='notice'>The water temperature seems to be [watertemp].</span>"
if(istype(I, /obj/item/weapon/wrench))
var/newtemp = input(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve") in temperature_settings
user << "<span class='notice'>You begin to adjust the temperature valve with \the [I].</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 50))
switch(watertemp)
if("normal")
watertemp = "freezing"
if("freezing")
watertemp = "boiling"
if("boiling")
watertemp = "normal"
watertemp = newtemp
user.visible_message("<span class='notice'>[user] adjusts the shower with \the [I].</span>", "<span class='notice'>You adjust the shower with \the [I].</span>")
add_fingerprint(user)
@@ -177,8 +174,8 @@
if(on)
overlays += image('icons/obj/watercloset.dmi', src, "water", MOB_LAYER + 1, dir)
if(watertemp == "freezing")
return
if(temperature_settings[watertemp] < T20C)
return //no mist for cold water
if(!ismist)
spawn(50)
if(src && on)
@@ -200,7 +197,7 @@
wash(O)
if(ismob(O))
mobpresent += 1
check_heat(O)
process_heat(O)
/obj/machinery/shower/Uncrossed(atom/movable/O)
if(ismob(O))
@@ -304,8 +301,8 @@
if(!on) return
wash_floor()
if(!mobpresent) return
for(var/mob/living/carbon/C in loc)
check_heat(C)
for(var/mob/living/L in loc)
process_heat(L)
/obj/machinery/shower/proc/wash_floor()
if(!ismist && is_washing)
@@ -317,22 +314,19 @@
spawn(100)
is_washing = 0
/obj/machinery/shower/proc/check_heat(mob/M as mob)
if(!on || watertemp == "normal") return
if(iscarbon(M))
var/mob/living/carbon/C = M
if(watertemp == "freezing")
C.bodytemperature = max(80, C.bodytemperature - 80)
C << "<span class='warning'>The water is freezing!</span>"
return
if(watertemp == "boiling")
C.bodytemperature = min(500, C.bodytemperature + 35)
C.adjustFireLoss(5)
C << "<span class='danger'>The water is searing!</span>"
return
/obj/machinery/shower/proc/process_heat(mob/living/M)
if(!on || !istype(M)) return
var/temperature = temperature_settings[watertemp]
var/temp_adj = between(BODYTEMP_COOLING_MAX, temperature - M.bodytemperature, BODYTEMP_HEATING_MAX)
M.bodytemperature += temp_adj
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(temperature >= H.species.heat_level_1)
H << "<span class='danger'>The water is searing hot!</span>"
else if(temperature <= H.species.cold_level_1)
H << "<span class='warning'>The water is freezing cold!</span>"
/obj/item/weapon/bikehorn/rubberducky
name = "rubber ducky"
+20 -16
View File
@@ -8,6 +8,8 @@
anchored = 1.0
flags = ON_BORDER
var/maxhealth = 14.0
var/maximal_heat = T0C + 100 // Maximal heat before this window begins taking damage from fire
var/damage_per_fire_tick = 2.0 // Amount of damage per fire tick. Regular windows are not fireproof so they might as well break quickly.
var/health
var/ini_dir = null
var/state = 2
@@ -398,8 +400,8 @@
return
/obj/structure/window/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > T0C + 800)
hit(round(exposed_volume / 100), 0)
if(exposed_temperature > maximal_heat)
hit(damage_per_fire_tick, 0)
..()
@@ -409,44 +411,46 @@
icon_state = "window"
basestate = "window"
glasstype = /obj/item/stack/material/glass
maximal_heat = T0C + 100
damage_per_fire_tick = 2.0
maxhealth = 12.0
/obj/structure/window/phoronbasic
name = "phoron window"
desc = "A phoron-glass alloy window. It looks insanely tough to break. It appears it's also insanely tough to burn through."
desc = "A borosilicate alloy window. It seems to be quite strong."
basestate = "phoronwindow"
icon_state = "phoronwindow"
shardtype = /obj/item/weapon/material/shard/phoron
glasstype = /obj/item/stack/material/glass/phoronglass
maxhealth = 120
/obj/structure/window/phoronbasic/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > T0C + 32000)
hit(round(exposed_volume / 1000), 0)
..()
maximal_heat = T0C + 2000
damage_per_fire_tick = 1.0
maxhealth = 40.0
/obj/structure/window/phoronreinforced
name = "reinforced phoron window"
desc = "A phoron-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic phoron windows are insanely fireproof."
name = "reinforced borosilicate window"
desc = "A borosilicate alloy window, with rods supporting it. It seems to be very strong."
basestate = "phoronrwindow"
icon_state = "phoronrwindow"
shardtype = /obj/item/weapon/material/shard/phoron
glasstype = /obj/item/stack/material/glass/phoronrglass
reinf = 1
maxhealth = 160
maximal_heat = T0C + 4000
damage_per_fire_tick = 1.0 // This should last for 80 fire ticks if the window is not damaged at all. The idea is that borosilicate windows have something like ablative layer that protects them for a while.
maxhealth = 80.0
/obj/structure/window/phoronreinforced/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return
/obj/structure/window/reinforced
name = "reinforced window"
desc = "It looks rather strong. Might take a few good hits to shatter it."
icon_state = "rwindow"
basestate = "rwindow"
maxhealth = 40
maxhealth = 40.0
reinf = 1
maximal_heat = T0C + 750
damage_per_fire_tick = 2.0
glasstype = /obj/item/stack/material/glass/reinforced
/obj/structure/window/New(Loc, constructed=0)
..()