mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
Merge Conflict
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
flame_range = min (MAX_EX_FLAME_RANGE, flame_range)
|
||||
|
||||
spawn(0)
|
||||
var/start = TimeOfHour
|
||||
var/watch = start_watch()
|
||||
if(!epicenter) return
|
||||
|
||||
var/max_range = max(devastation_range, heavy_impact_range, light_impact_range, flame_range)
|
||||
@@ -157,8 +157,7 @@
|
||||
var/turf/throw_at = get_ranged_target_turf(I, throw_dir, throw_range)
|
||||
I.throw_at(throw_at, throw_range, 2, no_spin = 1) //Throw it at 2 speed, this is purely visual anyway; don't spin the thrown items, it's very costly.
|
||||
*/
|
||||
var/timeofhour = TimeOfHour
|
||||
var/took = round((start <= timeofhour) ? ((timeofhour-start)/10) : ((timeofhour-(start-36000))/10), 0.01)
|
||||
var/took = stop_watch(watch)
|
||||
//You need to press the DebugGame verb to see these now....they were getting annoying and we've collected a fair bit of data. Just -test- changes to explosion code using this please so we can compare
|
||||
if(Debug2) log_to_dd("## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [took] seconds.")
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
if(C.client)
|
||||
C.eye_blurry = max(C.eye_blurry, 3)
|
||||
C.eye_blind = max(C.eye_blind, 1)
|
||||
if(C.eyecheck() <= 0) // no eye protection? ARGH IT BURNS.
|
||||
if(C.check_eye_prot() <= 0) // no eye protection? ARGH IT BURNS.
|
||||
C.confused = max(C.confused, 3)
|
||||
C.Weaken(3)
|
||||
C.lip_style = "spray_face"
|
||||
|
||||
@@ -75,26 +75,28 @@
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/device/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, convert = 1)
|
||||
/obj/item/device/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, targeted = 1)
|
||||
add_logs(M, user, "flashed", object="[src.name]")
|
||||
if(M.weakeyes)
|
||||
M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash
|
||||
var/safety = M:eyecheck()
|
||||
if(safety <= 0)
|
||||
M.confused += power
|
||||
flick("e_flash", M.flash)
|
||||
if(user && convert)
|
||||
if(user && targeted)
|
||||
if(M.weakeyes)
|
||||
M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash
|
||||
if(M.flash_eyes(1, 1))
|
||||
M.confused += power
|
||||
terrible_conversion_proc(M, user)
|
||||
M.Stun(1)
|
||||
user.visible_message("<span class='disarm'>[user] blinds [M] with the [src.name]!</span>")
|
||||
visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
|
||||
user << "<span class='danger'>You blind [M] with the flash!</span>"
|
||||
M << "<span class='userdanger'>[user] blinds you with the flash!</span>"
|
||||
if(M.weakeyes)
|
||||
M.Stun(2)
|
||||
M.visible_message("<span class='disarm'><b>[M]</b> gasps and shields their eyes!</span>")
|
||||
return 1
|
||||
M.visible_message("<span class='disarm'>[M] gasps and shields their eyes!</span>", "<span class='userdanger'>You gasp and shields your eyes!</span>")
|
||||
else
|
||||
visible_message("<span class='disarm'>[user] fails to blind [M] with the flash!</span>")
|
||||
user << "<span class='warning'>You fail to blind [M] with the flash!</span>"
|
||||
M << "<span class='danger'>[user] fails to blind you with the flash!</span>"
|
||||
else
|
||||
if(user)
|
||||
user.visible_message("<span class='disarm'>[user] fails to blind [M] with the [src.name]!</span>")
|
||||
return 0
|
||||
if(M.flash_eyes())
|
||||
M.confused += power
|
||||
|
||||
/obj/item/device/flash/attack(mob/living/M, mob/user)
|
||||
if(!try_use_flash(user))
|
||||
@@ -111,16 +113,16 @@
|
||||
else if(issilicon(M))
|
||||
if(isrobot(M))
|
||||
var/mob/living/silicon/robot/R = M
|
||||
|
||||
if (R.module) // Perhaps they didn't choose a module yet
|
||||
if(R.module) // Perhaps they didn't choose a module yet
|
||||
for(var/obj/item/borg/combat/shield/S in R.module.modules)
|
||||
if(R.activated(S))
|
||||
add_logs(M, user, "flashed", object="[src.name]")
|
||||
user.visible_message("<span class='disarm'>[user] tries to overloads [M]'s sensors with the [src.name], but if blocked by [M]'s shield!</span>", "<span class='danger'>You try to overload [M]'s sensors with the [src.name], but are blocked by his shield!</span>")
|
||||
return 1
|
||||
M.Weaken(rand(5,10))
|
||||
add_logs(M, user, "flashed", object="[src.name]")
|
||||
user.visible_message("<span class='disarm'>[user] overloads [M]'s sensors with the [src.name]!</span>", "<span class='danger'>You overload [M]'s sensors with the [src.name]!</span>")
|
||||
if(M.flash_eyes(affect_silicon = 1))
|
||||
M.Weaken(rand(5,10))
|
||||
user.visible_message("<span class='disarm'>[user] overloads [M]'s sensors with the [src.name]!</span>", "<span class='danger'>You overload [M]'s sensors with the [src.name]!</span>")
|
||||
return 1
|
||||
|
||||
user.visible_message("<span class='disarm'>[user] fails to blind [M] with the [src.name]!</span>", "<span class='warning'>You fail to blind [M] with the [src.name]!</span>")
|
||||
|
||||
@@ -55,28 +55,25 @@
|
||||
return
|
||||
|
||||
if(M == user) //they're using it on themselves
|
||||
if(!M.blinded)
|
||||
flick("flash", M.flash)
|
||||
if(M.flash_eyes(visual = 1))
|
||||
M.visible_message("<span class='notice'>[M] directs [src] to \his eyes.</span>", \
|
||||
"<span class='notice'>You wave the light in front of your eyes! Trippy!</span>")
|
||||
else
|
||||
M.visible_message("<span class='notice'>[M] directs [src] to \his eyes.</span>", \
|
||||
"<span class='notice'>You wave the light in front of your eyes.</span>")
|
||||
return
|
||||
else
|
||||
|
||||
user.visible_message("<span class='notice'>[user] directs [src] to [M]'s eyes.</span>", \
|
||||
"<span class='notice'>You direct [src] to [M]'s eyes.</span>")
|
||||
user.visible_message("<span class='notice'>[user] directs [src] to [M]'s eyes.</span>", \
|
||||
"<span class='notice'>You direct [src] to [M]'s eyes.</span>")
|
||||
|
||||
if(istype(M, /mob/living/carbon/human)) //robots and aliens are unaffected
|
||||
if(M.stat == DEAD || M.sdisabilities & BLIND) //mob is dead or fully blind
|
||||
user << "<span class='notice'>[M] pupils does not react to the light!</span>"
|
||||
else if(XRAY in M.mutations) //mob has X-RAY vision
|
||||
flick("flash", M.flash) //Yes, you can still get flashed wit X-Ray.
|
||||
user << "<span class='notice'>[M] pupils give an eerie glow!</span>"
|
||||
else //they're okay!
|
||||
if(!M.blinded)
|
||||
flick("flash", M.flash) //flash the affected mob
|
||||
user << "<span class='notice'>[M]'s pupils narrow.</span>"
|
||||
if(istype(M, /mob/living/carbon/human)) //robots and aliens are unaffected
|
||||
if(M.stat == DEAD || M.sdisabilities & BLIND) //mob is dead or fully blind
|
||||
user << "<span class='notice'>[M] pupils does not react to the light!</span>"
|
||||
else if(XRAY in M.mutations) //mob has X-RAY vision
|
||||
user << "<span class='notice'>[M] pupils give an eerie glow!</span>"
|
||||
else //they're okay!
|
||||
if(M.flash_eyes(visual = 1))
|
||||
user << "<span class='notice'>[M]'s pupils narrow.</span>"
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -90,66 +90,30 @@
|
||||
|
||||
//human/alien mobs
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
if(user.zone_sel.selecting == "eyes")
|
||||
var/mob/living/carbon/C = target
|
||||
add_logs(C, user, "shone in the eyes", object="laser pointer")
|
||||
|
||||
var/severity = 1
|
||||
if(prob(33))
|
||||
severity = 2
|
||||
else if(prob(50))
|
||||
severity = 0
|
||||
|
||||
//20% chance to actually hit the eyes
|
||||
|
||||
if(prob(effectchance * diode.rating))
|
||||
add_logs(C, user, "shone in the eyes", object="laser pointer")
|
||||
|
||||
|
||||
//eye target check
|
||||
if(prob(effectchance * diode.rating) && C.flash_eyes(severity))
|
||||
outmsg = "<span class='notice'>You blind [C] by shining [src] in their eyes.</span>"
|
||||
if(C.weakeyes)
|
||||
C.Stun(1)
|
||||
var/eye_prot = C.eyecheck()
|
||||
if(C.blinded || eye_prot >= 2)
|
||||
eye_prot = 4
|
||||
var/severity = 3 - eye_prot
|
||||
if(prob(33))
|
||||
severity += 1
|
||||
else if(prob(50))
|
||||
severity -= 1
|
||||
severity = min(max(severity, 0), 4)
|
||||
var/mob/living/carbon/human/H = C
|
||||
var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes)
|
||||
|
||||
switch(severity)
|
||||
if(0)
|
||||
//no effect
|
||||
C << "<span class='info'>A small, bright dot appears in your vision.</span>"
|
||||
if(1)
|
||||
//industrial grade eye protection
|
||||
E.damage += rand(0, 2)
|
||||
C << "<span class='notice'>Something bright flashes in the corner of your vision!</span>"
|
||||
if(2)
|
||||
//basic eye protection (sunglasses)
|
||||
flick("flash", C.flash)
|
||||
E.damage += rand(1, 6)
|
||||
C << "<span class='danger'>Your eyes were blinded!</span>"
|
||||
if(3)
|
||||
//no eye protection
|
||||
if(prob(2))
|
||||
C.Weaken(1)
|
||||
flick("e_flash", C.flash)
|
||||
E.damage += rand(3, 7)
|
||||
C << "<span class='danger'>Your eyes were blinded!</span>"
|
||||
if(4)
|
||||
//the effect has been worsened by something
|
||||
if(prob(5))
|
||||
C.Weaken(1)
|
||||
flick("e_flash", C.flash)
|
||||
E.damage += rand(5, 10)
|
||||
C << "<span class='danger'>Your eyes were blinded!</span>"
|
||||
else
|
||||
outmsg = "<span class='notice'>You fail to blind [C] by shining [src] at their eyes.</span>"
|
||||
outmsg = "<span class='warning'>You fail to blind [C] by shining [src] at their eyes!</span>"
|
||||
|
||||
//robots and AI
|
||||
else if(issilicon(target))
|
||||
var/mob/living/silicon/S = target
|
||||
//20% chance to actually hit the sensors
|
||||
if(prob(effectchance * diode.rating))
|
||||
S.flash_eyes(affect_silicon = 1)
|
||||
S.Weaken(rand(5,10))
|
||||
S << "<span class='warning'>Your sensors were overloaded by a laser!</span>"
|
||||
outmsg = "<span class='notice'>You overload [S] by shining [src] at their sensors.</span>"
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
attack_verb = list("hit", "bludgeoned", "whacked")
|
||||
hitsound = 'sound/weapons/grenadelaunch.ogg'
|
||||
|
||||
/obj/item/stack/rods/cyborg
|
||||
materials = list()
|
||||
|
||||
/obj/item/stack/rods/New(var/loc, var/amount=null)
|
||||
..()
|
||||
|
||||
@@ -41,11 +44,11 @@
|
||||
if(new_item.get_amount() <= 0)
|
||||
// stack was moved into another one on the pile
|
||||
new_item = locate() in user.loc
|
||||
|
||||
|
||||
user.visible_message("<span class='warning'>[user.name] shaped [src] into metal with the weldingtool.</span>", \
|
||||
"<span class='notice'>You shaped [src] into metal with the weldingtool.</span>", \
|
||||
"<span class='warning'>You hear welding.</span>")
|
||||
|
||||
|
||||
var/replace = user.get_inactive_hand() == src
|
||||
use(2)
|
||||
if (get_amount() <= 0 && replace)
|
||||
|
||||
@@ -24,12 +24,7 @@
|
||||
var/full_window = /obj/structure/window/full/basic
|
||||
|
||||
/obj/item/stack/sheet/glass/cyborg
|
||||
name = "glass"
|
||||
desc = "HOLY SHEET! That is a lot of glass."
|
||||
singular_name = "glass sheet"
|
||||
icon_state = "sheet-glass"
|
||||
materials = list()
|
||||
created_window = /obj/structure/window/basic
|
||||
|
||||
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
|
||||
construct_window(user)
|
||||
@@ -159,10 +154,6 @@
|
||||
var/full_window = /obj/structure/window/full/reinforced
|
||||
|
||||
/obj/item/stack/sheet/rglass/cyborg
|
||||
name = "reinforced glass"
|
||||
desc = "Glass which seems to have rods or something stuck in them."
|
||||
singular_name = "reinforced glass sheet"
|
||||
icon_state = "sheet-rglass"
|
||||
materials = list()
|
||||
|
||||
/obj/item/stack/sheet/rglass/attack_self(mob/user as mob)
|
||||
|
||||
@@ -97,13 +97,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||
origin_tech = "materials=1"
|
||||
|
||||
/obj/item/stack/sheet/metal/cyborg
|
||||
name = "metal"
|
||||
desc = "Sheets made out of metal."
|
||||
singular_name = "metal sheet"
|
||||
icon_state = "sheet-metal"
|
||||
materials = list()
|
||||
throwforce = 10.0
|
||||
flags = CONDUCT
|
||||
|
||||
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
|
||||
recipes = metal_recipes
|
||||
@@ -162,12 +156,6 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
|
||||
icon_state = "sheet-wood"
|
||||
origin_tech = "materials=1;biotech=1"
|
||||
|
||||
/obj/item/stack/sheet/wood/cyborg
|
||||
name = "wooden plank"
|
||||
desc = "One can only guess that this is a bunch of wood."
|
||||
singular_name = "wood plank"
|
||||
icon_state = "sheet-wood"
|
||||
|
||||
/obj/item/stack/sheet/wood/New(var/loc, var/amount=null)
|
||||
recipes = wood_recipes
|
||||
return ..()
|
||||
|
||||
@@ -124,4 +124,4 @@
|
||||
origin_tech = "materials=1"
|
||||
turf_type = /turf/simulated/floor/silent
|
||||
mineralType = "tranquillite"
|
||||
materials = list(MAT_TRANQUILLITE=500)
|
||||
materials = list(MAT_TRANQUILLITE=500)
|
||||
|
||||
@@ -16,9 +16,8 @@ var/turf/T
|
||||
// Make a quick flash
|
||||
var/turf/T = get_turf(src)
|
||||
playsound(T, 'sound/items/bikehorn.ogg', 100, 1)
|
||||
for(var/mob/living/carbon/human/M in viewers(T, null))
|
||||
if(M:eyecheck() <= 0)
|
||||
flick("e_flash", M.flash) // flash dose faggots
|
||||
for(var/mob/living/carbon/C in viewers(T, null))
|
||||
C.flash_eyes()
|
||||
for(var/i=1, i<=deliveryamt, i++)
|
||||
var/atom/movable/x = new spawner_type
|
||||
x.loc = T
|
||||
|
||||
@@ -78,7 +78,6 @@
|
||||
/////////////////////////////////
|
||||
/obj/item/weapon/grenade/flashbang/cluster
|
||||
icon_state = "flashbang_active"
|
||||
banglet = 1
|
||||
|
||||
/obj/item/weapon/grenade/clusterbuster/emp
|
||||
name = "Electromagnetic Storm"
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
icon_state = "flashbang"
|
||||
item_state = "flashbang"
|
||||
origin_tech = "materials=2;combat=1"
|
||||
var/banglet = 0
|
||||
|
||||
/obj/item/weapon/grenade/flashbang/prime()
|
||||
update_mob()
|
||||
@@ -24,42 +23,26 @@
|
||||
playsound(loc, 'sound/effects/bang.ogg', 25, 1)
|
||||
|
||||
//Checking for protections
|
||||
var/eye_safety = 0
|
||||
var/ear_safety = 0
|
||||
var/ear_safety = M.check_ear_prot()
|
||||
var/distance = max(1,get_dist(src,T))
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
eye_safety = C.eyecheck()
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if((H.r_ear && (H.r_ear.flags & EARBANGPROTECT)) || (H.l_ear && (H.l_ear.flags & EARBANGPROTECT)) || (H.head && (H.head.flags & HEADBANGPROTECT)))
|
||||
ear_safety++
|
||||
|
||||
//Flash
|
||||
var/eye_damage = rand(1,3)
|
||||
if(M.weakeyes)
|
||||
M.visible_message("<span class='disarm'><b>[M]</b> screams and collapses!</span>")
|
||||
M << "<span class='userdanger'>AAAAGH! IT BURNS!</span>"
|
||||
M << "<span class='userdanger'><font size=3>AAAAGH!</font></span>"
|
||||
M.Weaken(15) //hella stunned
|
||||
M.Stun(15)
|
||||
eye_damage += 8
|
||||
if(ishuman(M))
|
||||
M.emote("scream")
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes)
|
||||
if(E)
|
||||
E.damage += 8
|
||||
|
||||
if(!eye_safety && ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes)
|
||||
flick("e_flash", M.flash)
|
||||
if (E)
|
||||
E.damage += eye_damage
|
||||
if(M.flash_eyes(affect_silicon = 1))
|
||||
M.Stun(max(10/distance, 3))
|
||||
M.Weaken(max(10/distance, 3))
|
||||
if (istype(E) && E.damage >= E.min_bruised_damage)
|
||||
if(!(E.status & ORGAN_ROBOT))
|
||||
M << "<span class='warning'>Your eyes start to burn badly!</span>"
|
||||
else
|
||||
M << "<span class='warning'>The flash blinds you!</span>"
|
||||
if(!banglet)
|
||||
if (E.damage >= E.min_broken_damage)
|
||||
M << "<span class='warning'>You can't see anything!</span>"
|
||||
|
||||
|
||||
//Bang
|
||||
if((loc == M) || loc == M.loc)//Holding on person or being exactly where lies is significantly more dangerous and voids protection
|
||||
@@ -72,10 +55,9 @@
|
||||
M.ear_deaf = max(M.ear_deaf,15)
|
||||
if (M.ear_damage >= 15)
|
||||
M << "<span class='warning'>Your ears start to ring badly!</span>"
|
||||
if(!banglet)
|
||||
if(prob(M.ear_damage - 10 + 5))
|
||||
M << "<span class='warning'>You can't hear anything!</span>"
|
||||
M.disabilities |= DEAF
|
||||
if(prob(M.ear_damage - 10 + 5))
|
||||
M << "<span class='warning'>You can't hear anything!</span>"
|
||||
M.disabilities |= DEAF
|
||||
else
|
||||
if (M.ear_damage >= 5)
|
||||
M << "<span class='warning'>Your ears start to ring!</span>"
|
||||
@@ -5,7 +5,6 @@
|
||||
icon_state = "delivery"
|
||||
item_state = "flashbang"
|
||||
origin_tech = "materials=3;magnets=4"
|
||||
var/banglet = 0
|
||||
var/spawner_type = null // must be an object path
|
||||
var/deliveryamt = 1 // amount of type to deliver
|
||||
spawner_type = /mob/living/simple_animal/hostile/viscerator
|
||||
@@ -16,9 +15,8 @@
|
||||
// Make a quick flash
|
||||
var/turf/T = get_turf(src)
|
||||
playsound(T, 'sound/effects/phasein.ogg', 100, 1)
|
||||
for(var/mob/living/carbon/human/M in viewers(T, null))
|
||||
if(M:eyecheck() <= 0)
|
||||
flick("e_flash", M.flash) // flash dose faggots
|
||||
for(var/mob/living/carbon/C in viewers(T, null))
|
||||
C.flash_eyes()
|
||||
|
||||
for(var/i=1, i<=deliveryamt, i++)
|
||||
var/atom/movable/x = new spawner_type
|
||||
|
||||
@@ -215,9 +215,14 @@
|
||||
use_to_pickup = 1
|
||||
storage_slots = 14
|
||||
display_contents_with_number = 1
|
||||
var/base_name = ""
|
||||
var/label_text = ""
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/New()
|
||||
..()
|
||||
base_name = name
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/MouseDrop(obj/over_object as obj) //Quick pillbottle fix. -Agouri
|
||||
|
||||
if (ishuman(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~
|
||||
var/mob/M = usr
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
@@ -239,6 +244,24 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/attackby(var/obj/item/I, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/weapon/pen) || istype(I, /obj/item/device/flashlight/pen))
|
||||
var/tmp_label = sanitize(input(user, "Enter a label for [name]","Label",label_text))
|
||||
if(length(tmp_label) > MAX_NAME_LEN)
|
||||
user << "<span class='warning'>The label can be at most [MAX_NAME_LEN] characters long.</span>"
|
||||
else
|
||||
user << "<span class='notice'>You set the label to \"[tmp_label]\".</span>"
|
||||
label_text = tmp_label
|
||||
update_name_label()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/proc/update_name_label()
|
||||
if(label_text == "")
|
||||
name = base_name
|
||||
else
|
||||
name = "[base_name] ([label_text])"
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/charcoal
|
||||
name = "Pill bottle (Charcoal)"
|
||||
desc = "Contains pills used to counter toxins."
|
||||
|
||||
@@ -291,15 +291,15 @@
|
||||
/obj/item/weapon/weldingtool/proc/get_fuel()
|
||||
return reagents.get_reagent_amount("fuel")
|
||||
|
||||
//Removes fuel from the welding tool. If a mob is passed, it will perform an eyecheck on the mob. This should probably be renamed to use()
|
||||
/obj/item/weapon/weldingtool/proc/remove_fuel(var/amount = 1, var/mob/M = null)
|
||||
//Removes fuel from the welding tool. If a mob is passed, it will try to flash the mob's eyes. This should probably be renamed to use()
|
||||
/obj/item/weapon/weldingtool/proc/remove_fuel(var/amount = 1, var/mob/living/M = null)
|
||||
if(!welding || !check_fuel())
|
||||
return 0
|
||||
if(get_fuel() >= amount)
|
||||
reagents.remove_reagent("fuel", amount)
|
||||
check_fuel()
|
||||
if(M)
|
||||
eyecheck(M)
|
||||
M.flash_eyes(light_intensity)
|
||||
return 1
|
||||
else
|
||||
if(M)
|
||||
@@ -351,46 +351,6 @@
|
||||
hitsound = "swing_hit"
|
||||
update_icon()
|
||||
|
||||
//Decides whether or not to damage a player's eyes based on what they're wearing as protection
|
||||
//Note: This should probably be moved to mob
|
||||
/obj/item/weapon/weldingtool/proc/eyecheck(mob/user as mob)
|
||||
if(!iscarbon(user)) return 1
|
||||
var/safety = user:eyecheck()
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes)
|
||||
if(!istype(E)) // No eyes? No problem!
|
||||
return
|
||||
switch(safety)
|
||||
if(1)
|
||||
usr << "<span class='danger'>Your eyes sting a little.</span>"
|
||||
E.damage += rand(1, 2)
|
||||
if(E.damage > 12)
|
||||
user.eye_blurry += rand(3,6)
|
||||
if(0)
|
||||
usr << "<span class='danger'>Your eyes burn.</span>"
|
||||
E.damage += rand(2, 4)
|
||||
if(E.damage > 10)
|
||||
E.damage += rand(4,10)
|
||||
if(-1)
|
||||
usr << "<span class='danger'>Your thermals intensify the welder's glow. Your eyes itch and burn severely.</span>"
|
||||
user.eye_blurry += rand(12,20)
|
||||
E.damage += rand(12, 16)
|
||||
if(safety<2)
|
||||
if(E.damage > 10)
|
||||
user << "<span class='danger'>Your eyes are really starting to hurt. This can't be good for you!</span>"
|
||||
if (E.damage >= E.min_broken_damage)
|
||||
user << "<span class='danger'>You go blind!</span>"
|
||||
user.sdisabilities |= BLIND
|
||||
else if (E.damage >= E.min_bruised_damage)
|
||||
user << "<span class='danger'>You go blind!</span>"
|
||||
user.eye_blind = 5
|
||||
user.eye_blurry = 5
|
||||
user.disabilities |= NEARSIGHTED
|
||||
spawn(100)
|
||||
user.disabilities &= ~NEARSIGHTED
|
||||
return
|
||||
|
||||
/obj/item/weapon/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user)
|
||||
if(welding)
|
||||
user << "<span class='warning'>Turn it off first!</span>"
|
||||
|
||||
@@ -80,10 +80,10 @@
|
||||
|
||||
for(var/line in lines)
|
||||
//world << line
|
||||
for(var/beat in text2list(lowertext(line), ","))
|
||||
for(var/beat in splittext(lowertext(line), ","))
|
||||
//world << "beat: [beat]"
|
||||
var/list/notes = text2list(beat, "/")
|
||||
for(var/note in text2list(notes[1], "-"))
|
||||
var/list/notes = splittext(beat, "/")
|
||||
for(var/note in splittext(notes[1], "-"))
|
||||
//world << "note: [note]"
|
||||
if(!playing || shouldStopPlaying(user))//If the instrument is playing, or special case
|
||||
playing = 0
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
//split into lines
|
||||
spawn()
|
||||
lines = text2list(t, "\n")
|
||||
lines = splittext(t, "\n")
|
||||
if(copytext(lines[1],1,6) == "BPM: ")
|
||||
tempo = sanitize_tempo(600 / text2num(copytext(lines[1],6)))
|
||||
lines.Cut(1,2)
|
||||
|
||||
@@ -244,7 +244,7 @@ obj/structure/transit_tube/ex_act(severity)
|
||||
if(text in direction_table)
|
||||
return direction_table[text]
|
||||
|
||||
var/list/split_text = text2list(text, "-")
|
||||
var/list/split_text = splittext(text, "-")
|
||||
|
||||
// If the first token is D, the icon_state represents
|
||||
// a purely decorative tube, and doesn't actually
|
||||
|
||||
Reference in New Issue
Block a user