mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Recoded flashes a bit
Lowered the break prob Added eyescrewdrivering, debraining to the attacklog Added BoH blackholes to the gamelog and admin messages git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2005 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1,26 +1,57 @@
|
||||
/obj/item/device/flash
|
||||
name = "flash"
|
||||
desc = "Used for blinding and being an asshole."
|
||||
icon_state = "flash"
|
||||
throwforce = 5
|
||||
w_class = 1.0
|
||||
throw_speed = 4
|
||||
throw_range = 10
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
item_state = "electronic"
|
||||
origin_tech = "magnets=2;combat=1"
|
||||
|
||||
/obj/item/device/flash/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
if ((usr.mutations & CLOWN) && prob(50))
|
||||
usr << "\red The Flash slips out of your hand."
|
||||
usr.drop_item()
|
||||
return
|
||||
if (src.shots > 0)
|
||||
var
|
||||
shots_left = 5
|
||||
max_shots = 5
|
||||
broken = 0
|
||||
|
||||
proc
|
||||
clown_check(var/mob/user)
|
||||
recharge()
|
||||
|
||||
|
||||
|
||||
|
||||
attack(mob/living/M as mob, mob/user as mob)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been flashed (attempt) with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to flash [M.name] ([M.ckey])</font>")
|
||||
if(!clown_check(user)) return
|
||||
if(broken)
|
||||
user.show_message("\red The [src.name] is broken", 2)
|
||||
return
|
||||
|
||||
var/safety = null
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if (istype(H.glasses, /obj/item/clothing/glasses/sunglasses))
|
||||
safety = 1
|
||||
if (istype(H.head, /obj/item/clothing/head/helmet/welding))
|
||||
if(!H.head:up)
|
||||
safety = 1
|
||||
if (istype(H.wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
safety = 1
|
||||
if (istype(M, /mob/living/carbon/alien))//So aliens don't get flashed (they have no external eyes)/N
|
||||
safety = 1
|
||||
if (isrobot(user))
|
||||
if(shots_left <= 0)
|
||||
user.show_message("\red *click* *click*", 2)
|
||||
return
|
||||
|
||||
playsound(src.loc, 'flash.ogg', 100, 1)
|
||||
shots_left--
|
||||
var/flashfail = 0
|
||||
|
||||
if(iscarbon(M))
|
||||
var/safety = M:eyecheck()
|
||||
if(!safety)
|
||||
if(M.weakened <= 10)
|
||||
M.weakened = 10
|
||||
flick("e_flash", M.flash)
|
||||
|
||||
if(ishuman(M))//&& (rerevcheckvargoeshere)) //Rev check
|
||||
if(user.mind in ticker.mode.head_revolutionaries)
|
||||
ticker.mode.add_revolutionary(M.mind)
|
||||
else
|
||||
flashfail = 1
|
||||
|
||||
else if(isrobot(user))
|
||||
spawn(0)
|
||||
var/atom/movable/overlay/animation = new(user.loc)
|
||||
animation.layer = user.layer + 1
|
||||
@@ -30,96 +61,89 @@
|
||||
flick("blspell", animation)
|
||||
sleep(5)
|
||||
del(animation)
|
||||
if (!( safety ))
|
||||
if (M.client)//Probably here to prevent forced conversion of dced players. /N
|
||||
if (status == 0)
|
||||
user << "\red The bulb has been burnt out!"
|
||||
return
|
||||
if (!( safety ) && status == 1)
|
||||
playsound(src.loc, 'flash.ogg', 100, 1)
|
||||
if(!(M.mutations & HULK)) M.weakened = 10
|
||||
if (prob(10))
|
||||
status = 0
|
||||
user << "\red The bulb has burnt out!"
|
||||
return
|
||||
if ((M.eye_stat > 15 && prob(M.eye_stat + 50)))
|
||||
flick("e_flash", M.flash)
|
||||
M.eye_stat += rand(1, 2)
|
||||
else
|
||||
flick("flash", M.flash)
|
||||
M.eye_stat += rand(0, 2)
|
||||
if (M.eye_stat >= 20)
|
||||
M << "\red You eyes start to burn badly!"
|
||||
M.disabilities |= 1
|
||||
if (prob(M.eye_stat - 20 + 1))
|
||||
M << "\red You go blind!"
|
||||
M.sdisabilities |= 1
|
||||
if(/*ticker.mode.name == "revolution" && */ istype(M, /mob/living/carbon))
|
||||
if(user.mind in ticker.mode.head_revolutionaries)
|
||||
ticker.mode.add_revolutionary(M.mind)
|
||||
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if(status == 1)
|
||||
O.show_message(text("\red [] blinds [] with the flash!", user, M))
|
||||
|
||||
if(!flashfail)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red [] blinds [] with the flash!", user, M))
|
||||
else
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if(status == 1)
|
||||
O.show_message(text("\blue [] fails to blind [] with the flash!", user, M))
|
||||
src.attack_self(user, 1)
|
||||
return
|
||||
O.show_message(text("\blue [] fails to blind [] with the flash!", user, M))
|
||||
|
||||
/obj/item/device/flash/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
|
||||
if (emp)
|
||||
|
||||
else if ((usr.mutations & CLOWN) && prob(50))
|
||||
usr << "\red The Flash slips out of your hand."
|
||||
usr.drop_item()
|
||||
return
|
||||
else if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
if ( world.time > (src.l_time + 600))
|
||||
src.shots = 5
|
||||
if (src.shots < 1)
|
||||
user.show_message("\red *click* *click*", 2)
|
||||
|
||||
if (prob(2))
|
||||
broken = 1
|
||||
user << "\red The bulb has burnt out!"
|
||||
|
||||
spawn(60)
|
||||
recharge()
|
||||
|
||||
return
|
||||
|
||||
src.l_time = world.time
|
||||
add_fingerprint(user)
|
||||
src.shots--
|
||||
playsound(src.loc, 'flash.ogg', 100, 1)
|
||||
flick("flash2", src)
|
||||
if(isrobot(user))
|
||||
spawn(0)
|
||||
var/atom/movable/overlay/animation = new(user.loc)
|
||||
animation.layer = user.layer + 1
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'mob.dmi'
|
||||
animation.master = user
|
||||
flick("blspell", animation)
|
||||
sleep(5)
|
||||
del(animation)
|
||||
if (!( flag ))
|
||||
|
||||
attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
|
||||
if(!clown_check(user) && !emp) return
|
||||
if(broken)
|
||||
user.show_message("\red The [src.name] is broken", 2)
|
||||
return
|
||||
|
||||
if(shots_left <= 0)
|
||||
user.show_message("\red *click* *click*", 2)
|
||||
return
|
||||
|
||||
playsound(src.loc, 'flash.ogg', 100, 1)
|
||||
shots_left--
|
||||
|
||||
flick("flash2", src)
|
||||
if(isrobot(user))
|
||||
spawn(0)
|
||||
var/atom/movable/overlay/animation = new(user.loc)
|
||||
animation.layer = user.layer + 1
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'mob.dmi'
|
||||
animation.master = user
|
||||
flick("blspell", animation)
|
||||
sleep(5)
|
||||
del(animation)
|
||||
|
||||
for(var/mob/living/carbon/M in oviewers(3, null))
|
||||
if (prob(50))
|
||||
if(prob(50))
|
||||
if (locate(/obj/item/weapon/cloaking_device, M))
|
||||
for(var/obj/item/weapon/cloaking_device/S in M)
|
||||
S.active = 0
|
||||
S.icon_state = "shield0"
|
||||
if (M.client)
|
||||
var/safety = null
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if (istype(H.glasses, /obj/item/clothing/glasses/sunglasses))
|
||||
safety = 1
|
||||
if (istype(H.head, /obj/item/clothing/head/helmet/welding))
|
||||
if(!H.head:up)
|
||||
safety = 1
|
||||
if (istype(M, /mob/living/carbon/alien))//So aliens don't see those annoying flash screens.
|
||||
safety = 1
|
||||
if (!( safety ))
|
||||
flick("flash", M.flash)
|
||||
var/safety = M:eyecheck()
|
||||
if(!safety)
|
||||
flick("flash", M.flash)
|
||||
|
||||
/obj/item/device/flash/emp_act(severity)
|
||||
src.attack_self(null,1,1)
|
||||
..()
|
||||
if (prob(2))
|
||||
broken = 1
|
||||
user << "\red The bulb has burnt out!"
|
||||
|
||||
spawn(60)
|
||||
recharge()
|
||||
|
||||
return
|
||||
|
||||
|
||||
emp_act(severity)
|
||||
src.attack_self(null,1,1)
|
||||
..()
|
||||
|
||||
|
||||
clown_check(var/mob/user)
|
||||
if((user.mutations & CLOWN) && prob(50))
|
||||
user << "\red The Flash slips out of your hand."
|
||||
user.drop_item()
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
recharge()
|
||||
if(max_shots > shots_left)
|
||||
shots_left++
|
||||
if(max_shots > shots_left)
|
||||
spawn(60)//more or less 10 seconds
|
||||
recharge()
|
||||
return
|
||||
@@ -483,6 +483,9 @@
|
||||
user << "\red You cannot locate any eyes on this creature!"
|
||||
return
|
||||
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
|
||||
src.add_fingerprint(user)
|
||||
//if((user.mutations & CLOWN) && prob(50))
|
||||
// M = user
|
||||
|
||||
@@ -540,6 +540,9 @@ CIRCULAR SAW
|
||||
"\red You sever your brain's connection to the spine with [src]!" \
|
||||
)
|
||||
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
|
||||
var/obj/item/brain/B = new(M.loc)
|
||||
B.transfer_identity(M)
|
||||
|
||||
|
||||
@@ -8,12 +8,24 @@ WELDINGTOOOL
|
||||
|
||||
|
||||
// WRENCH
|
||||
/obj/item/weapon/wrench/New()
|
||||
if (prob(75))
|
||||
src.pixel_x = rand(0, 16)
|
||||
return
|
||||
/obj/item/weapon/wrench
|
||||
name = "wrench"
|
||||
desc = "A wrench with common uses. Can be found in your hand."
|
||||
icon = 'items.dmi'
|
||||
icon_state = "wrench"
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
force = 5.0
|
||||
throwforce = 7.0
|
||||
w_class = 2.0
|
||||
m_amt = 150
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
|
||||
|
||||
New()
|
||||
if (prob(75))
|
||||
src.pixel_x = rand(0, 16)
|
||||
return
|
||||
|
||||
|
||||
|
||||
// SCREWDRIVER
|
||||
@@ -24,9 +36,7 @@ WELDINGTOOOL
|
||||
return
|
||||
|
||||
/obj/item/weapon/screwdriver/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if(!istype(M)) return ..()
|
||||
if(user.zone_sel.selecting != "eyes" && user.zone_sel.selecting != "head")
|
||||
return ..()
|
||||
if((user.mutations & CLOWN) && prob(50))
|
||||
@@ -35,7 +45,6 @@ WELDINGTOOOL
|
||||
|
||||
|
||||
|
||||
|
||||
// WELDING TOOL
|
||||
/obj/item/weapon/weldingtool
|
||||
name = "Welding Tool"
|
||||
@@ -54,6 +63,12 @@ WELDINGTOOOL
|
||||
welding = 0
|
||||
status = 1
|
||||
max_fuel = 20
|
||||
proc
|
||||
get_fuel()
|
||||
remove_fuel(var/amount = 1, var/mob/M = null)
|
||||
check_status()
|
||||
toggle(var/message = 0)
|
||||
eyecheck(mob/user as mob)
|
||||
|
||||
|
||||
New()
|
||||
@@ -131,7 +146,6 @@ WELDINGTOOOL
|
||||
location.hotspot_expose(700, 5)
|
||||
|
||||
|
||||
|
||||
afterattack(obj/O as obj, mob/user as mob)
|
||||
if (istype(O, /obj/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && !src.welding)
|
||||
O.reagents.trans_to(src, max_fuel)
|
||||
@@ -159,114 +173,96 @@ WELDINGTOOOL
|
||||
return
|
||||
|
||||
|
||||
proc
|
||||
|
||||
|
||||
///GET prop for fuel
|
||||
get_fuel()
|
||||
return reagents.get_reagent_amount("fuel")
|
||||
get_fuel()
|
||||
return reagents.get_reagent_amount("fuel")
|
||||
|
||||
|
||||
///SET prop for fuel
|
||||
///Will also turn it off if it is out of fuel
|
||||
///The mob argument is not needed but if included will call eyecheck() on it if the welder is on.
|
||||
remove_fuel(var/amount = 1, var/mob/M = null)
|
||||
if(!welding || !check_status())
|
||||
return 0
|
||||
if(get_fuel() >= amount)
|
||||
reagents.remove_reagent("fuel", amount)
|
||||
check_status()
|
||||
if(M)
|
||||
eyecheck(M)//TODO:eyecheck should really be in mob not here
|
||||
return 1
|
||||
else
|
||||
if(M)
|
||||
M << "\blue You need more welding fuel to complete this task."
|
||||
return 0
|
||||
remove_fuel(var/amount = 1, var/mob/M = null)
|
||||
if(!welding || !check_status())
|
||||
return 0
|
||||
if(get_fuel() >= amount)
|
||||
reagents.remove_reagent("fuel", amount)
|
||||
check_status()
|
||||
if(M)
|
||||
eyecheck(M)//TODO:eyecheck should really be in mob not here
|
||||
return 1
|
||||
else
|
||||
if(M)
|
||||
M << "\blue You need more welding fuel to complete this task."
|
||||
return 0
|
||||
|
||||
|
||||
///Quick check to see if we even have any fuel and should shut off
|
||||
///This could use a better name
|
||||
check_status()
|
||||
if((get_fuel() <= 0) && welding)
|
||||
toggle(1)
|
||||
return 0
|
||||
return 1
|
||||
check_status()
|
||||
if((get_fuel() <= 0) && welding)
|
||||
toggle(1)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
//toggles the welder off and on
|
||||
toggle(var/message = 0)
|
||||
if(!status) return
|
||||
src.welding = !( src.welding )
|
||||
if (src.welding)
|
||||
if (remove_fuel(1))
|
||||
usr << "\blue You switch the [src] on."
|
||||
src.force = 15
|
||||
src.damtype = "fire"
|
||||
src.icon_state = "welder1"
|
||||
processing_items.Add(src)
|
||||
else
|
||||
usr << "\blue Need more fuel!"
|
||||
src.welding = 0
|
||||
return
|
||||
toggle(var/message = 0)
|
||||
if(!status) return
|
||||
src.welding = !( src.welding )
|
||||
if (src.welding)
|
||||
if (remove_fuel(1))
|
||||
usr << "\blue You switch the [src] on."
|
||||
src.force = 15
|
||||
src.damtype = "fire"
|
||||
src.icon_state = "welder1"
|
||||
processing_items.Add(src)
|
||||
else
|
||||
if(!message)
|
||||
usr << "\blue You switch the [src] off."
|
||||
else
|
||||
usr << "\blue The [src] shuts off!"
|
||||
src.force = 3
|
||||
src.damtype = "brute"
|
||||
src.icon_state = "welder"
|
||||
usr << "\blue Need more fuel!"
|
||||
src.welding = 0
|
||||
return
|
||||
else
|
||||
if(!message)
|
||||
usr << "\blue You switch the [src] off."
|
||||
else
|
||||
usr << "\blue The [src] shuts off!"
|
||||
src.force = 3
|
||||
src.damtype = "brute"
|
||||
src.icon_state = "welder"
|
||||
src.welding = 0
|
||||
|
||||
|
||||
eyecheck(mob/user as mob)//TODO:Move this over to /mob/ where it should be
|
||||
//check eye protection
|
||||
if(!ishuman(user) && !ismonkey(user))
|
||||
return 1
|
||||
var/safety = 0
|
||||
if (istype(user, /mob/living/carbon/human))
|
||||
if (istype(user:head, /obj/item/clothing/head/helmet/welding))
|
||||
if (!user:head:up)
|
||||
safety = 2
|
||||
else if (istype(user:head, /obj/item/clothing/head/helmet/space))
|
||||
safety = 2
|
||||
else if (istype(user:glasses, /obj/item/clothing/glasses/sunglasses))
|
||||
safety = 1
|
||||
|
||||
else if (istype(user:glasses, /obj/item/clothing/glasses/thermal))
|
||||
safety = -1
|
||||
else
|
||||
safety = 0
|
||||
switch(safety)
|
||||
if(1)
|
||||
usr << "\red Your eyes sting a little."
|
||||
user.eye_stat += rand(1, 2)
|
||||
if(user.eye_stat > 12)
|
||||
user.eye_blurry += rand(3,6)
|
||||
if(0)
|
||||
usr << "\red Your eyes burn."
|
||||
user.eye_stat += rand(2, 4)
|
||||
if(user.eye_stat > 10)
|
||||
user.eye_blurry += rand(4,10)
|
||||
if(-1)
|
||||
usr << "\red Your thermals intensify the welder's glow. Your eyes itch and burn severely."
|
||||
user.eye_blurry += rand(12,20)
|
||||
user.eye_stat += rand(12, 16)
|
||||
if(user.eye_stat > 10 && safety < 2)
|
||||
user << "\red Your eyes are really starting to hurt. This can't be good for you!"
|
||||
if (prob(user.eye_stat - 25 + 1))
|
||||
user << "\red You go blind!"
|
||||
user.sdisabilities |= 1
|
||||
else if (prob(user.eye_stat - 15 + 1))
|
||||
user << "\red You go blind!"
|
||||
user.eye_blind = 5
|
||||
user.eye_blurry = 5
|
||||
user.disabilities |= 1
|
||||
spawn(100)
|
||||
user.disabilities &= ~1
|
||||
return
|
||||
|
||||
eyecheck(mob/user as mob)
|
||||
//check eye protection
|
||||
if(!iscarbon(user)) return 1
|
||||
var/safety = user:eyecheck()
|
||||
switch(safety)
|
||||
if(1)
|
||||
usr << "\red Your eyes sting a little."
|
||||
user.eye_stat += rand(1, 2)
|
||||
if(user.eye_stat > 12)
|
||||
user.eye_blurry += rand(3,6)
|
||||
if(0)
|
||||
usr << "\red Your eyes burn."
|
||||
user.eye_stat += rand(2, 4)
|
||||
if(user.eye_stat > 10)
|
||||
user.eye_blurry += rand(4,10)
|
||||
if(-1)
|
||||
usr << "\red Your thermals intensify the welder's glow. Your eyes itch and burn severely."
|
||||
user.eye_blurry += rand(12,20)
|
||||
user.eye_stat += rand(12, 16)
|
||||
if(user.eye_stat > 10 && safety < 2)
|
||||
user << "\red Your eyes are really starting to hurt. This can't be good for you!"
|
||||
if (prob(user.eye_stat - 25 + 1))
|
||||
user << "\red You go blind!"
|
||||
user.sdisabilities |= 1
|
||||
else if (prob(user.eye_stat - 15 + 1))
|
||||
user << "\red You go blind!"
|
||||
user.eye_blind = 5
|
||||
user.eye_blurry = 5
|
||||
user.disabilities |= 1
|
||||
spawn(100)
|
||||
user.disabilities &= ~1
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/weldingtool/largetank
|
||||
@@ -290,3 +286,22 @@ WELDINGTOOOL
|
||||
w_class = 3.0
|
||||
m_amt = 70
|
||||
g_amt = 120
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/wirecutters
|
||||
name = "wirecutters"
|
||||
desc = "This cuts wires."
|
||||
icon = 'items.dmi'
|
||||
icon_state = "cutters"
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
force = 6.0
|
||||
throw_speed = 2
|
||||
throw_range = 9
|
||||
w_class = 2.0
|
||||
m_amt = 80
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
|
||||
New()
|
||||
if(prob(50))
|
||||
icon_state = "cutters-y"
|
||||
@@ -51,6 +51,8 @@
|
||||
user << "\red The Bluespace interfaces of the two devices catastrophically malfunction!"
|
||||
del(W)
|
||||
new /obj/machinery/singularity (get_turf(src))
|
||||
message_admins("[key_name_admin(user)] detonated a bag of holding")
|
||||
log_game("[key_name(user)] detonated a bag of holding")
|
||||
del(src)
|
||||
return
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user