mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 11:07:12 +01:00
Merge remote-tracking branch 'upstream/master' into tgport-16569
Conflicts: .gitignore
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/atom/movable
|
||||
layer = 3
|
||||
appearance_flags = TILE_BOUND
|
||||
var/last_move = null
|
||||
var/anchored = 0
|
||||
// var/elevation = 2 - not used anywhere
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
else
|
||||
prefix=""
|
||||
|
||||
var/list/words = text2list(message," ")
|
||||
var/list/words = splittext(message," ")
|
||||
var/list/rearranged = list()
|
||||
for(var/i=1;i<=words.len;i++)
|
||||
var/cword = pick(words)
|
||||
@@ -216,7 +216,7 @@
|
||||
suffix = copytext(cword,length(cword)-1,length(cword) )
|
||||
if(length(cword))
|
||||
rearranged += cword
|
||||
return "[prefix][uppertext(list2text(rearranged," "))]!!"
|
||||
return "[prefix][uppertext(jointext(rearranged," "))]!!"
|
||||
|
||||
// WAS: /datum/bioEffect/toxic_farts
|
||||
/datum/dna/gene/disability/toxic_farts
|
||||
|
||||
@@ -986,7 +986,7 @@ var/list/sacrificed = list()
|
||||
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
flick("e_flash", C.flash)
|
||||
C.flash_eyes()
|
||||
if(C.stuttering < 1 && (!(HULK in C.mutations)))
|
||||
C.stuttering = 1
|
||||
C.Weaken(1)
|
||||
@@ -1013,7 +1013,7 @@ var/list/sacrificed = list()
|
||||
|
||||
else if(iscarbon(T))
|
||||
var/mob/living/carbon/C = T
|
||||
flick("e_flash", C.flash)
|
||||
C.flash_eyes()
|
||||
if (!(HULK in C.mutations))
|
||||
C.silent += 15
|
||||
C.Weaken(10)
|
||||
|
||||
@@ -32,7 +32,7 @@ datum/directive/bluespace_contagion/initialize()
|
||||
infected_names+="[candidate.mind.assigned_role] [candidate.mind.name]"
|
||||
|
||||
special_orders = list(
|
||||
"Quarantine these personnel: [list2text(infected_names, ", ")].",
|
||||
"Quarantine these personnel: [jointext(infected_names, ", ")].",
|
||||
"Allow one hour for a cure to be manufactured.",
|
||||
"If no cure arrives after that time, execute and burn the infected.")
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ datum/directive/vox_heist/initialize()
|
||||
sympathizer_names.Add("[candidate.mind.assigned_role] [candidate.mind.name]")
|
||||
|
||||
if(sympathizers.len)
|
||||
special_orders.Add("Brig the following sympathizers: [list2text(sympathizer_names, ", ")]")
|
||||
special_orders.Add("Brig the following sympathizers: [jointext(sympathizer_names, ", ")]")
|
||||
|
||||
datum/directive/vox_heist/meets_prerequisites()
|
||||
var/list/candidates = get_vox_candidates()
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
if(!req_access)
|
||||
req_access = list()
|
||||
if(req_access_txt)
|
||||
var/list/req_access_str = text2list(req_access_txt, ";")
|
||||
var/list/req_access_str = splittext(req_access_txt, ";")
|
||||
for(var/x in req_access_str)
|
||||
var/n = text2num(x)
|
||||
if(n)
|
||||
@@ -143,7 +143,7 @@
|
||||
if(!req_one_access)
|
||||
req_one_access = list()
|
||||
if(req_one_access_txt)
|
||||
var/list/req_one_access_str = text2list(req_one_access_txt,";")
|
||||
var/list/req_one_access_str = splittext(req_one_access_txt,";")
|
||||
for(var/x in req_one_access_str)
|
||||
var/n = text2num(x)
|
||||
if(n)
|
||||
|
||||
@@ -34,7 +34,7 @@ var/list/whitelist = list()
|
||||
while(query.NextRow())
|
||||
var/joblist = query.item[1]
|
||||
if(joblist!="*")
|
||||
var/allowed_jobs = text2list(joblist,",")
|
||||
var/allowed_jobs = splittext(joblist,",")
|
||||
if(rank in allowed_jobs) return 1
|
||||
else return 1
|
||||
return 0
|
||||
@@ -56,7 +56,7 @@ var/list/whitelist = list()
|
||||
if (!text)
|
||||
diary << "Failed to load config/alienwhitelist.txt\n"
|
||||
else
|
||||
alien_whitelist = text2list(text, "\n")
|
||||
alien_whitelist = splittext(text, "\n")
|
||||
|
||||
//todo: admin aliens
|
||||
/proc/is_alien_whitelisted(mob/M, var/species)
|
||||
@@ -78,7 +78,7 @@ var/list/whitelist = list()
|
||||
while(query.NextRow())
|
||||
var/specieslist = query.item[1]
|
||||
if(specieslist!="*")
|
||||
var/allowed_species = text2list(specieslist,",")
|
||||
var/allowed_species = splittext(specieslist,",")
|
||||
if(species in allowed_species) return 1
|
||||
else return 1
|
||||
return 0
|
||||
|
||||
@@ -375,7 +375,7 @@ update_flag
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/attack_alien(mob/living/carbon/alien/humanoid/user)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/attack_ghost(var/mob/user as mob)
|
||||
return src.ui_interact(user)
|
||||
|
||||
@@ -427,7 +427,7 @@ update_flag
|
||||
/obj/machinery/portable_atmospherics/canister/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
|
||||
if (href_list["choice"] == "menu")
|
||||
menu = text2num(href_list["mode_target"])
|
||||
|
||||
@@ -625,13 +625,12 @@ update_flag
|
||||
|
||||
if(busy)
|
||||
return 0
|
||||
if(!WT.isOn())
|
||||
if(!WT.remove_fuel(0, user))
|
||||
return 0
|
||||
|
||||
// Do after stuff here
|
||||
user << "<span class='notice'>You start to slice away at \the [src]...</span>"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
WT.eyecheck(user)
|
||||
busy = 1
|
||||
if(do_after(user, 50, target = src))
|
||||
busy = 0
|
||||
|
||||
@@ -385,4 +385,4 @@
|
||||
/obj/machinery/camera/portable/process() //Updates whenever the camera is moved.
|
||||
if(cameranet && get_turf(src) != prev_turf)
|
||||
cameranet.updatePortableCamera(src)
|
||||
prev_turf = get_turf(src)
|
||||
prev_turf = get_turf(src)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
usr << "No input found please hang up and try your call again."
|
||||
return
|
||||
|
||||
var/list/tempnetwork = text2list(input, ",")
|
||||
var/list/tempnetwork = splittext(input, ",")
|
||||
if(tempnetwork.len < 1)
|
||||
usr << "No network found please hang up and try your call again."
|
||||
return
|
||||
@@ -153,16 +153,15 @@
|
||||
if(!anchored)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/camera_assembly/proc/weld(var/obj/item/weapon/weldingtool/WT, var/mob/user)
|
||||
/obj/item/weapon/camera_assembly/proc/weld(var/obj/item/weapon/weldingtool/WT, var/mob/living/user)
|
||||
|
||||
if(busy)
|
||||
return 0
|
||||
if(!WT.isOn())
|
||||
if(!WT.remove_fuel(0, user))
|
||||
return 0
|
||||
|
||||
user << "<span class='notice'>You start to weld the [src]..</span>"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
WT.eyecheck(user)
|
||||
busy = 1
|
||||
if(do_after(user, 20, target = src))
|
||||
busy = 0
|
||||
|
||||
@@ -221,7 +221,7 @@ What a mess.*/
|
||||
return
|
||||
Perp = new/list()
|
||||
t1 = lowertext(t1)
|
||||
var/list/components = text2list(t1, " ")
|
||||
var/list/components = splittext(t1, " ")
|
||||
if(components.len > 5)
|
||||
return //Lets not let them search too greedily.
|
||||
for(var/datum/data/record/R in data_core.general)
|
||||
|
||||
@@ -2,21 +2,21 @@
|
||||
//this is the master controller, that things will try to dock with.
|
||||
/obj/machinery/embedded_controller/radio/docking_port_multi
|
||||
name = "docking port controller"
|
||||
|
||||
|
||||
var/child_tags_txt
|
||||
var/child_names_txt
|
||||
var/list/child_names = list()
|
||||
|
||||
|
||||
var/datum/computer/file/embedded_program/docking/multi/docking_program
|
||||
|
||||
/obj/machinery/embedded_controller/radio/docking_port_multi/initialize()
|
||||
..()
|
||||
docking_program = new/datum/computer/file/embedded_program/docking/multi(src)
|
||||
program = docking_program
|
||||
|
||||
var/list/names = text2list(child_names_txt, ";")
|
||||
var/list/tags = text2list(child_tags_txt, ";")
|
||||
|
||||
|
||||
var/list/names = splittext(child_names_txt, ";")
|
||||
var/list/tags = splittext(child_tags_txt, ";")
|
||||
|
||||
if (names.len == tags.len)
|
||||
for (var/i = 1; i <= tags.len; i++)
|
||||
child_names[tags[i]] = names[i]
|
||||
@@ -84,10 +84,10 @@
|
||||
/obj/machinery/embedded_controller/radio/airlock/docking_port_multi/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
|
||||
var/clean = 0
|
||||
switch(href_list["command"]) //anti-HTML-hacking checks
|
||||
if("cycle_ext")
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
if (istype(M,/obj/machinery/embedded_controller/radio/docking_port_multi)) //if our parent controller is the right type, then we can auto-init stuff at construction
|
||||
var/obj/machinery/embedded_controller/radio/docking_port_multi/controller = M
|
||||
//parse child_tags_txt and create child tags
|
||||
children_tags = text2list(controller.child_tags_txt, ";")
|
||||
children_tags = splittext(controller.child_tags_txt, ";")
|
||||
|
||||
children_ready = list()
|
||||
children_override = list()
|
||||
|
||||
@@ -66,31 +66,12 @@
|
||||
src.last_flash = world.time
|
||||
use_power(1000)
|
||||
|
||||
for (var/mob/O in viewers(src, null))
|
||||
if (get_dist(src, O) > src.range)
|
||||
for(var/mob/living/L in viewers(src, null))
|
||||
if (get_dist(src, L) > src.range)
|
||||
continue
|
||||
|
||||
if (istype(O, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = O
|
||||
if(!H.eyecheck() <= 0)
|
||||
continue
|
||||
|
||||
if (istype(O, /mob/living/carbon/alien))//So aliens don't get flashed (they have no external eyes)/N
|
||||
continue
|
||||
|
||||
O.Weaken(strength)
|
||||
if(O.weakeyes)
|
||||
O.Weaken(strength * 1.5)
|
||||
O.visible_message("<span class='disarm'><b>[O]</b> gasps and shields their eyes!</span>")
|
||||
if (istype(O, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = O
|
||||
var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes)
|
||||
if (E && (E.damage > E.min_bruised_damage && prob(E.damage + 50)))
|
||||
flick("e_flash", O:flash)
|
||||
E.damage += rand(1, 2)
|
||||
else
|
||||
if(!O.blinded)
|
||||
flick("flash", O:flash)
|
||||
if(L.flash_eyes(affect_silicon = 1))
|
||||
L.Weaken(strength)
|
||||
|
||||
|
||||
/obj/machinery/flasher/emp_act(severity)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
codes = new()
|
||||
|
||||
var/list/entries = text2list(codes_txt, ";") // entries are separated by semicolons
|
||||
var/list/entries = splittext(codes_txt, ";") // entries are separated by semicolons
|
||||
|
||||
for(var/e in entries)
|
||||
var/index = findtext(e, "=") // format is "key=value"
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
wires = new(src)
|
||||
spawn(50)
|
||||
if(product_slogans)
|
||||
slogan_list += text2list(product_slogans, ";")
|
||||
slogan_list += splittext(product_slogans, ";")
|
||||
|
||||
// So not all machines speak at the exact same time.
|
||||
// The first time this machine says something will be at slogantime + this random value,
|
||||
@@ -110,7 +110,7 @@
|
||||
last_slogan = world.time + rand(0, slogan_delay)
|
||||
|
||||
if(product_ads)
|
||||
ads_list += text2list(product_ads, ";")
|
||||
ads_list += splittext(product_ads, ";")
|
||||
|
||||
build_inventory()
|
||||
power_change()
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -77,24 +77,21 @@
|
||||
|
||||
/obj/item/device/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, convert = 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)
|
||||
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>")
|
||||
if(M.weakeyes)
|
||||
M.Stun(2)
|
||||
M.visible_message("<span class='disarm'><b>[M]</b> gasps and shields their eyes!</span>")
|
||||
return 1
|
||||
else
|
||||
if(user)
|
||||
user.visible_message("<span class='disarm'>[user] blinds [M] with the [src.name]!</span>")
|
||||
else
|
||||
user.visible_message("<span class='disarm'>[user] fails to blind [M] with the [src.name]!</span>")
|
||||
return 0
|
||||
else
|
||||
if(M.flash_eyes())
|
||||
M.confused += power
|
||||
|
||||
/obj/item/device/flash/attack(mob/living/M, mob/user)
|
||||
if(!try_use_flash(user))
|
||||
@@ -111,16 +108,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>"
|
||||
|
||||
@@ -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,17 @@
|
||||
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.Weaken(15) //hella stunned
|
||||
M.Stun(15)
|
||||
eye_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))
|
||||
if(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)
|
||||
if(E)
|
||||
E.damage += rand(1, 3)
|
||||
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 +46,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
|
||||
|
||||
@@ -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