Bleeding edgy refresh (#303)
* not code stuff * other things * global vars, defines, helpers * onclick hud stuff, orphans, world.dm * controllers and datums * game folder * everything not client/mobs in modules * client folder * stage 1 mob stuff * simple animal things * silicons * carbon things * ayylmaos and monkeys * hyoomahn * icons n shit * sprite fixes * compile fixes * some fixes I cherrypicked. * qdel fixes * forgot brain refractors
This commit is contained in:
@@ -8,37 +8,37 @@
|
||||
var/inverse = 0
|
||||
// For inverse dir frames like light fixtures.
|
||||
|
||||
/obj/item/wallframe/proc/try_build(turf/on_wall)
|
||||
if(get_dist(on_wall,usr)>1)
|
||||
/obj/item/wallframe/proc/try_build(turf/on_wall, mob/user)
|
||||
if(get_dist(on_wall,user)>1)
|
||||
return
|
||||
var/ndir = get_dir(on_wall, usr)
|
||||
var/ndir = get_dir(on_wall, user)
|
||||
if(!(ndir in cardinal))
|
||||
return
|
||||
var/turf/loc = get_turf(usr)
|
||||
var/area/A = loc.loc
|
||||
if(!isfloorturf(loc))
|
||||
usr << "<span class='warning'>You cannot place [src] on this spot!</span>"
|
||||
var/turf/T = get_turf(user)
|
||||
var/area/A = get_area(T)
|
||||
if(!isfloorturf(T))
|
||||
to_chat(user, "<span class='warning'>You cannot place [src] on this spot!</span>")
|
||||
return
|
||||
if(A.requires_power == 0 || istype(A, /area/space))
|
||||
usr << "<span class='warning'>You cannot place [src] in this area!</span>"
|
||||
if(A.always_unpowered)
|
||||
to_chat(user, "<span class='warning'>You cannot place [src] in this area!</span>")
|
||||
return
|
||||
if(gotwallitem(loc, ndir, inverse*2))
|
||||
usr << "<span class='warning'>There's already an item on this wall!</span>"
|
||||
if(gotwallitem(T, ndir, inverse*2))
|
||||
to_chat(user, "<span class='warning'>There's already an item on this wall!</span>")
|
||||
return
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/wallframe/proc/attach(turf/on_wall)
|
||||
/obj/item/wallframe/proc/attach(turf/on_wall, mob/user)
|
||||
if(result_path)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 75, 1)
|
||||
usr.visible_message("[usr.name] attaches [src] to the wall.",
|
||||
user.visible_message("[user.name] attaches [src] to the wall.",
|
||||
"<span class='notice'>You attach [src] to the wall.</span>",
|
||||
"<span class='italics'>You hear clicking.</span>")
|
||||
var/ndir = get_dir(on_wall,usr)
|
||||
var/ndir = get_dir(on_wall,user)
|
||||
if(inverse)
|
||||
ndir = turn(ndir, 180)
|
||||
|
||||
var/obj/O = new result_path(get_turf(usr), ndir, 1)
|
||||
var/obj/O = new result_path(get_turf(user), ndir, 1)
|
||||
after_attach(O)
|
||||
|
||||
qdel(src)
|
||||
@@ -58,7 +58,7 @@
|
||||
var/glass_amt = round(materials[MAT_GLASS]/MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
if(istype(W, /obj/item/weapon/wrench) && (metal_amt || glass_amt))
|
||||
user << "<span class='notice'>You dismantle [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You dismantle [src].</span>")
|
||||
if(metal_amt)
|
||||
new /obj/item/stack/sheet/metal(get_turf(src), metal_amt)
|
||||
if(glass_amt)
|
||||
@@ -77,24 +77,27 @@
|
||||
inverse = 1
|
||||
|
||||
|
||||
/obj/item/wallframe/apc/try_build(turf/on_wall)
|
||||
/obj/item/wallframe/apc/try_build(turf/on_wall, user)
|
||||
if(!..())
|
||||
return
|
||||
var/turf/loc = get_turf(usr)
|
||||
var/area/A = loc.loc
|
||||
if (A.get_apc())
|
||||
usr << "<span class='warning'>This area already has APC!</span>"
|
||||
var/turf/T = get_turf(user)
|
||||
var/area/A = get_area(T)
|
||||
if(A.get_apc())
|
||||
to_chat(user, "<span class='warning'>This area already has an APC!</span>")
|
||||
return //only one APC per area
|
||||
for(var/obj/machinery/power/terminal/T in loc)
|
||||
if (T.master)
|
||||
usr << "<span class='warning'>There is another network terminal here!</span>"
|
||||
if(!A.requires_power)
|
||||
to_chat(user, "<span class='warning'>You cannot place [src] in this area!</span>")
|
||||
return //can't place apcs in areas with no power requirement
|
||||
for(var/obj/machinery/power/terminal/E in T)
|
||||
if(E.master)
|
||||
to_chat(user, "<span class='warning'>There is another network terminal here!</span>")
|
||||
return
|
||||
else
|
||||
var/obj/item/stack/cable_coil/C = new /obj/item/stack/cable_coil(loc)
|
||||
var/obj/item/stack/cable_coil/C = new /obj/item/stack/cable_coil(T)
|
||||
C.amount = 10
|
||||
usr << "<span class='notice'>You cut the cables and disassemble the unused power terminal.</span>"
|
||||
qdel(T)
|
||||
return 1
|
||||
to_chat(user, "<span class='notice'>You cut the cables and disassemble the unused power terminal.</span>")
|
||||
qdel(E)
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/weapon/electronics
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
showing = get_images(get_turf(user), viewing.view)
|
||||
viewing.images |= showing
|
||||
if(message)
|
||||
user << message
|
||||
to_chat(user, message)
|
||||
|
||||
/obj/item/areaeditor/blueprints/proc/clear_viewer(mob/user, message = "")
|
||||
if(viewing)
|
||||
@@ -135,7 +135,7 @@
|
||||
viewing = null
|
||||
showing.Cut()
|
||||
if(message)
|
||||
user << message
|
||||
to_chat(user, message)
|
||||
|
||||
/obj/item/areaeditor/blueprints/dropped(mob/user)
|
||||
..()
|
||||
@@ -191,13 +191,13 @@
|
||||
if(!istype(res,/list))
|
||||
switch(res)
|
||||
if(ROOM_ERR_SPACE)
|
||||
creator << "<span class='warning'>The new area must be completely airtight.</span>"
|
||||
to_chat(creator, "<span class='warning'>The new area must be completely airtight.</span>")
|
||||
return
|
||||
if(ROOM_ERR_TOOLARGE)
|
||||
creator << "<span class='warning'>The new area is too large.</span>"
|
||||
to_chat(creator, "<span class='warning'>The new area is too large.</span>")
|
||||
return
|
||||
else
|
||||
creator << "<span class='warning'>Error! Please notify administration.</span>"
|
||||
to_chat(creator, "<span class='warning'>Error! Please notify administration.</span>")
|
||||
return
|
||||
|
||||
var/list/turfs = res
|
||||
@@ -205,7 +205,7 @@
|
||||
if(!str || !length(str)) //cancel
|
||||
return
|
||||
if(length(str) > 50)
|
||||
creator << "<span class='warning'>The given name is too long. The area remains undefined.</span>"
|
||||
to_chat(creator, "<span class='warning'>The given name is too long. The area remains undefined.</span>")
|
||||
return
|
||||
var/area/old = get_area(get_turf(creator))
|
||||
var/old_gravity = old.has_gravity
|
||||
@@ -218,13 +218,20 @@
|
||||
turfs -= turfs[key]
|
||||
turfs -= key
|
||||
if(A)
|
||||
A.contents += turfs
|
||||
A.SetDynamicLighting()
|
||||
A.set_dynamic_lighting()
|
||||
for (var/turf/T in turfs)
|
||||
var/area/old_area = T.loc
|
||||
A.contents += T
|
||||
T.change_area(old_area, T)
|
||||
|
||||
else
|
||||
A = new
|
||||
A.setup(str)
|
||||
A.contents += turfs
|
||||
A.SetDynamicLighting()
|
||||
A.set_dynamic_lighting()
|
||||
for (var/turf/T in turfs)
|
||||
var/area/old_area = T.loc
|
||||
A.contents += T
|
||||
T.change_area(old_area, T)
|
||||
A.has_gravity = old_gravity
|
||||
|
||||
for(var/area/RA in old.related)
|
||||
@@ -233,7 +240,7 @@
|
||||
var/obj/machinery/door/firedoor/FD = D
|
||||
FD.CalculateAffectingAreas()
|
||||
|
||||
creator << "<span class='notice'>You have created a new area, named [str]. It is now weather proof, and constructing an APC will allow it to be powered.</span>"
|
||||
to_chat(creator, "<span class='notice'>You have created a new area, named [str]. It is now weather proof, and constructing an APC will allow it to be powered.</span>")
|
||||
return 1
|
||||
|
||||
/obj/item/areaeditor/proc/edit_area()
|
||||
@@ -243,7 +250,7 @@
|
||||
if(!str || !length(str) || str==prevname) //cancel
|
||||
return
|
||||
if(length(str) > 50)
|
||||
usr << "<span class='warning'>The given name is too long. The area's name is unchanged.</span>"
|
||||
to_chat(usr, "<span class='warning'>The given name is too long. The area's name is unchanged.</span>")
|
||||
return
|
||||
set_area_machinery_title(A,str,prevname)
|
||||
for(var/area/RA in A.related)
|
||||
@@ -252,7 +259,7 @@
|
||||
for(var/D in RA.firedoors)
|
||||
var/obj/machinery/door/firedoor/FD = D
|
||||
FD.CalculateAffectingAreas()
|
||||
usr << "<span class='notice'>You rename the '[prevname]' to '[str]'.</span>"
|
||||
to_chat(usr, "<span class='notice'>You rename the '[prevname]' to '[str]'.</span>")
|
||||
interact()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
/obj/item/organ/body_egg/on_find(mob/living/finder)
|
||||
..()
|
||||
finder << "<span class='warning'>You found an unknown alien organism in [owner]'s [zone]!</span>"
|
||||
to_chat(finder, "<span class='warning'>You found an unknown alien organism in [owner]'s [zone]!</span>")
|
||||
|
||||
/obj/item/organ/body_egg/New(loc)
|
||||
if(iscarbon(loc))
|
||||
|
||||
@@ -41,13 +41,13 @@
|
||||
/obj/item/bodybag/bluespace/examine(mob/user)
|
||||
..()
|
||||
if(contents.len)
|
||||
user << "<span class='notice'>You can make out the shapes of [contents.len] objects through the fabric.</span>"
|
||||
to_chat(user, "<span class='notice'>You can make out the shapes of [contents.len] objects through the fabric.</span>")
|
||||
|
||||
/obj/item/bodybag/bluespace/Destroy()
|
||||
for(var/atom/movable/A in contents)
|
||||
A.forceMove(get_turf(src))
|
||||
if(isliving(A))
|
||||
A << "<span class='notice'>You suddenly feel the space around you torn apart! You're free!</span>"
|
||||
to_chat(A, "<span class='notice'>You suddenly feel the space around you torn apart! You're free!</span>")
|
||||
return ..()
|
||||
|
||||
/obj/item/bodybag/bluespace/deploy_bodybag(mob/user, atom/location)
|
||||
@@ -55,21 +55,21 @@
|
||||
for(var/atom/movable/A in contents)
|
||||
A.forceMove(R)
|
||||
if(isliving(A))
|
||||
A << "<span class='notice'>You suddenly feel air around you! You're free!</span>"
|
||||
to_chat(A, "<span class='notice'>You suddenly feel air around you! You're free!</span>")
|
||||
R.open(user)
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/bodybag/bluespace/container_resist(mob/living/user)
|
||||
if(user.incapacitated())
|
||||
user << "<span class='warning'>You can't get out while you're restrained like this!</span>"
|
||||
to_chat(user, "<span class='warning'>You can't get out while you're restrained like this!</span>")
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
user << "<span class='notice'>You claw at the fabric of [src], trying to tear it open...</span>"
|
||||
loc << "<span class='warning'>Someone starts trying to break free of [src]!</span>"
|
||||
to_chat(user, "<span class='notice'>You claw at the fabric of [src], trying to tear it open...</span>")
|
||||
to_chat(loc, "<span class='warning'>Someone starts trying to break free of [src]!</span>")
|
||||
if(!do_after(user, 200, target = src))
|
||||
loc << "<span class='warning'>The pressure subsides. It seems that they've stopped resisting...</span>"
|
||||
to_chat(loc, "<span class='warning'>The pressure subsides. It seems that they've stopped resisting...</span>")
|
||||
return
|
||||
loc.visible_message("<span class='warning'>[user] suddenly appears in front of [loc]!</span>", "<span class='userdanger'>[user] breaks free of [src]!</span>")
|
||||
qdel(src)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
icon_state = "candle1"
|
||||
item_state = "candle1"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
light_color = LIGHT_COLOR_FIRE
|
||||
var/wax = 200
|
||||
var/lit = FALSE
|
||||
var/infinite = FALSE
|
||||
@@ -46,7 +47,7 @@
|
||||
//src.damtype = "fire"
|
||||
if(show_message)
|
||||
usr.visible_message(show_message)
|
||||
SetLuminosity(CANDLE_LUMINOSITY)
|
||||
set_light(CANDLE_LUMINOSITY)
|
||||
START_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
@@ -68,22 +69,7 @@
|
||||
"<span class='notice'>[user] snuffs [src].</span>")
|
||||
lit = FALSE
|
||||
update_icon()
|
||||
SetLuminosity(0)
|
||||
user.AddLuminosity(-CANDLE_LUMINOSITY)
|
||||
|
||||
|
||||
/obj/item/candle/pickup(mob/user)
|
||||
..()
|
||||
if(lit)
|
||||
SetLuminosity(0)
|
||||
user.AddLuminosity(CANDLE_LUMINOSITY)
|
||||
|
||||
|
||||
/obj/item/candle/dropped(mob/user)
|
||||
..()
|
||||
if(lit)
|
||||
user.AddLuminosity(-CANDLE_LUMINOSITY)
|
||||
SetLuminosity(CANDLE_LUMINOSITY)
|
||||
set_light(0)
|
||||
|
||||
/obj/item/candle/is_hot()
|
||||
return lit * heat
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
/obj/item/cardboard_cutout/attack_self(mob/living/user)
|
||||
if(!pushed_over)
|
||||
return
|
||||
user << "<span class='notice'>You right [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You right [src].</span>")
|
||||
desc = initial(desc)
|
||||
icon = initial(icon)
|
||||
icon_state = initial(icon_state) //This resets a cutout to its blank state - this is intentional to allow for resetting
|
||||
@@ -76,12 +76,12 @@
|
||||
if(!crayon || !user)
|
||||
return
|
||||
if(pushed_over)
|
||||
user << "<span class='warning'>Right [src] first!</span>"
|
||||
to_chat(user, "<span class='warning'>Right [src] first!</span>")
|
||||
return
|
||||
if(crayon.check_empty(user))
|
||||
return
|
||||
if(crayon.is_capped)
|
||||
user << "<span class='warning'>Take the cap off first!</span>"
|
||||
to_chat(user, "<span class='warning'>Take the cap off first!</span>")
|
||||
return
|
||||
var/new_appearance = input(user, "Choose a new appearance for [src].", "26th Century Deception") as null|anything in possible_appearances
|
||||
if(!new_appearance || !crayon || !user.canUseTopic(src))
|
||||
|
||||
@@ -33,15 +33,13 @@
|
||||
|
||||
/obj/item/station_charter/attack_self(mob/living/user)
|
||||
if(used)
|
||||
user << "This charter has already been used to name the station."
|
||||
to_chat(user, "This charter has already been used to name the station.")
|
||||
return
|
||||
if(!ignores_timeout && (world.time-round_start_time > STATION_RENAME_TIME_LIMIT)) //5 minutes
|
||||
user << "The crew has already settled into the shift. \
|
||||
It probably wouldn't be good to rename the station right now."
|
||||
to_chat(user, "The crew has already settled into the shift. It probably wouldn't be good to rename the station right now.")
|
||||
return
|
||||
if(response_timer_id)
|
||||
user << "You're still waiting for approval from your employers about \
|
||||
your proposed name change, it'd be best to wait for now."
|
||||
to_chat(user, "You're still waiting for approval from your employers about your proposed name change, it'd be best to wait for now.")
|
||||
return
|
||||
|
||||
var/new_name = stripped_input(user, message="What do you want to name \
|
||||
@@ -55,14 +53,14 @@
|
||||
[new_name]")
|
||||
|
||||
if(standard_station_regex.Find(new_name))
|
||||
user << "Your name has been automatically approved."
|
||||
to_chat(user, "Your name has been automatically approved.")
|
||||
rename_station(new_name, user)
|
||||
return
|
||||
|
||||
user << "Your name has been sent to your employers for approval."
|
||||
to_chat(user, "Your name has been sent to your employers for approval.")
|
||||
// Autoapproves after a certain time
|
||||
response_timer_id = addtimer(CALLBACK(src, .proc/rename_station, new_name, user.name, user.real_name, key_name(user)), approval_time, TIMER_STOPPABLE)
|
||||
admins << "<span class='adminnotice'><b><font color=orange>CUSTOM STATION RENAME:</font></b>[key_name_admin(user)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) proposes to rename the station to [new_name] (will autoapprove in [approval_time / 10] seconds). (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[user]'>BSA</A>) (<A HREF='?_src_=holder;reject_custom_name=\ref[src]'>REJECT</A>) (<a href='?_src_=holder;CentcommReply=\ref[user]'>RPLY</a>)</span>"
|
||||
to_chat(admins, "<span class='adminnotice'><b><font color=orange>CUSTOM STATION RENAME:</font></b>[key_name_admin(user)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) proposes to rename the station to [new_name] (will autoapprove in [approval_time / 10] seconds). (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[user]'>BSA</A>) (<A HREF='?_src_=holder;reject_custom_name=\ref[src]'>REJECT</A>) (<a href='?_src_=holder;CentcommReply=\ref[user]'>RPLY</a>)</span>")
|
||||
|
||||
/obj/item/station_charter/proc/reject_proposed(user)
|
||||
if(!user)
|
||||
@@ -81,11 +79,7 @@
|
||||
response_timer_id = null
|
||||
|
||||
/obj/item/station_charter/proc/rename_station(designation, uname, ureal_name, ukey)
|
||||
if(config && config.server_name)
|
||||
world.name = "[config.server_name]: [designation]"
|
||||
else
|
||||
world.name = designation
|
||||
station_name = designation
|
||||
change_station_name(designation)
|
||||
minor_announce("[ureal_name] has designated your station as [station_name()]", "Captain's Charter", 0)
|
||||
log_game("[ukey] has renamed the station as [station_name()].")
|
||||
|
||||
@@ -96,4 +90,8 @@
|
||||
if(!unlimited_uses)
|
||||
used = TRUE
|
||||
|
||||
#undef STATION_RENAME_TIME_LIMIT
|
||||
/obj/item/station_charter/admin
|
||||
unlimited_uses = TRUE
|
||||
ignores_timeout = TRUE
|
||||
|
||||
#undef STATION_RENAME_TIME_LIMIT
|
||||
|
||||
@@ -26,16 +26,16 @@
|
||||
mode = WAND_EMERGENCY
|
||||
if(WAND_EMERGENCY)
|
||||
mode = WAND_OPEN
|
||||
user << "Now in mode: [mode]."
|
||||
to_chat(user, "Now in mode: [mode].")
|
||||
|
||||
/obj/item/weapon/door_remote/afterattack(obj/machinery/door/airlock/D, mob/user)
|
||||
if(!istype(D))
|
||||
return
|
||||
if(!(D.hasPower()))
|
||||
user << "<span class='danger'>[D] has no power!</span>"
|
||||
to_chat(user, "<span class='danger'>[D] has no power!</span>")
|
||||
return
|
||||
if(!D.requiresID())
|
||||
user << "<span class='danger'>[D]'s ID scan is disabled!</span>"
|
||||
to_chat(user, "<span class='danger'>[D]'s ID scan is disabled!</span>")
|
||||
return
|
||||
if(D.check_access(ID) && D.canAIControl(user))
|
||||
switch(mode)
|
||||
@@ -56,7 +56,7 @@
|
||||
D.emergency = 1
|
||||
D.update_icon()
|
||||
else
|
||||
user << "<span class='danger'>[src] does not have access to this door.</span>"
|
||||
to_chat(user, "<span class='danger'>[src] does not have access to this door.</span>")
|
||||
|
||||
/obj/item/weapon/door_remote/omni
|
||||
name = "omni door remote"
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
if(charges == -1)
|
||||
. = FALSE
|
||||
else if(!charges_left)
|
||||
user << "<span class='warning'>There is no more of \the [src.name] left!</span>"
|
||||
to_chat(user, "<span class='warning'>There is no more of \the [src.name] left!</span>")
|
||||
if(self_contained)
|
||||
qdel(src)
|
||||
. = TRUE
|
||||
@@ -149,7 +149,7 @@
|
||||
/obj/item/toy/crayon/spraycan/AltClick(mob/user)
|
||||
if(has_cap)
|
||||
is_capped = !is_capped
|
||||
user << "<span class='notice'>The cap on [src] is now [is_capped ? "on" : "off"].</span>"
|
||||
to_chat(user, "<span class='notice'>The cap on [src] is now [is_capped ? "on" : "off"].</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/toy/crayon/ui_data()
|
||||
@@ -299,7 +299,7 @@
|
||||
graf_rot = 0
|
||||
|
||||
if(!instant)
|
||||
user << "<span class='notice'>You start drawing a [temp] on the [target.name]...</span>"
|
||||
to_chat(user, "<span class='notice'>You start drawing a [temp] on the [target.name]...</span>")
|
||||
|
||||
if(pre_noise)
|
||||
audible_message("<span class='notice'>You hear spraying.</span>")
|
||||
@@ -344,13 +344,13 @@
|
||||
affected_turfs += right
|
||||
affected_turfs += target
|
||||
else
|
||||
user << "<span class='warning'>There isn't enough space to paint!</span>"
|
||||
to_chat(user, "<span class='warning'>There isn't enough space to paint!</span>")
|
||||
return
|
||||
|
||||
if(!instant)
|
||||
user << "<span class='notice'>You finish drawing \the [temp].</span>"
|
||||
to_chat(user, "<span class='notice'>You finish drawing \the [temp].</span>")
|
||||
else
|
||||
user << "<span class='notice'>You spray a [temp] on \the [target.name]</span>"
|
||||
to_chat(user, "<span class='notice'>You spray a [temp] on \the [target.name]</span>")
|
||||
|
||||
if(length(text_buffer))
|
||||
text_buffer = copytext(text_buffer,2)
|
||||
@@ -373,7 +373,7 @@
|
||||
|
||||
/obj/item/toy/crayon/attack(mob/M, mob/user)
|
||||
if(edible && (M == user))
|
||||
user << "You take a bite of the [src.name]. Delicious!"
|
||||
to_chat(user, "You take a bite of the [src.name]. Delicious!")
|
||||
var/eaten = use_charges(5)
|
||||
if(check_empty(user)) //Prevents divsion by zero
|
||||
return
|
||||
@@ -389,7 +389,7 @@
|
||||
// Reject space, player-created areas, and non-station z-levels.
|
||||
var/area/A = get_area(target)
|
||||
if(!A || (A.z != ZLEVEL_STATION) || !A.valid_territory)
|
||||
user << "<span class='warning'>[A] is unsuitable for tagging.</span>"
|
||||
to_chat(user, "<span class='warning'>[A] is unsuitable for tagging.</span>")
|
||||
return FALSE
|
||||
|
||||
var/spraying_over = FALSE
|
||||
@@ -397,14 +397,12 @@
|
||||
spraying_over = TRUE
|
||||
|
||||
for(var/obj/machinery/power/apc in target)
|
||||
user << "<span class='warning'>You can't tag an APC.</span>"
|
||||
to_chat(user, "<span class='warning'>You can't tag an APC.</span>")
|
||||
return FALSE
|
||||
|
||||
var/occupying_gang = territory_claimed(A, user)
|
||||
if(occupying_gang && !spraying_over)
|
||||
user << "<span class='danger'>[A] has already been tagged \
|
||||
by the [occupying_gang] gang! You must get rid of or spray over \
|
||||
the old tag first!</span>"
|
||||
to_chat(user, "<span class='danger'>[A] has already been tagged by the [occupying_gang] gang! You must get rid of or spray over the old tag first!</span>")
|
||||
return FALSE
|
||||
|
||||
// If you pass the gaunlet of checks, you're good to proceed
|
||||
@@ -425,7 +423,7 @@
|
||||
var/area/territory = get_area(target)
|
||||
|
||||
new /obj/effect/decal/cleanable/crayon/gang(target,gangID,"graffiti",0)
|
||||
user << "<span class='notice'>You tagged [territory] for your gang!</span>"
|
||||
to_chat(user, "<span class='notice'>You tagged [territory] for your gang!</span>")
|
||||
|
||||
/obj/item/toy/crayon/red
|
||||
icon_state = "crayonred"
|
||||
@@ -530,13 +528,13 @@
|
||||
var/obj/item/toy/crayon/C = W
|
||||
switch(C.item_color)
|
||||
if("mime")
|
||||
usr << "This crayon is too sad to be contained in this box."
|
||||
to_chat(usr, "This crayon is too sad to be contained in this box.")
|
||||
return
|
||||
if("rainbow")
|
||||
usr << "This crayon is too powerful to be contained in this box."
|
||||
to_chat(usr, "This crayon is too powerful to be contained in this box.")
|
||||
return
|
||||
if(istype(W, /obj/item/toy/crayon/spraycan))
|
||||
user << "Spraycans are not crayons."
|
||||
to_chat(user, "Spraycans are not crayons.")
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -605,16 +603,16 @@
|
||||
/obj/item/toy/crayon/spraycan/examine(mob/user)
|
||||
. = ..()
|
||||
if(charges_left)
|
||||
user << "It has [charges_left] uses left."
|
||||
to_chat(user, "It has [charges_left] uses left.")
|
||||
else
|
||||
user << "It is empty."
|
||||
to_chat(user, "It is empty.")
|
||||
|
||||
/obj/item/toy/crayon/spraycan/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if(is_capped)
|
||||
user << "<span class='warning'>Take the cap off first!</span>"
|
||||
to_chat(user, "<span class='warning'>Take the cap off first!</span>")
|
||||
return
|
||||
|
||||
if(check_empty(user))
|
||||
@@ -626,7 +624,7 @@
|
||||
|
||||
var/mob/living/carbon/C = target
|
||||
user.visible_message("<span class='danger'>[user] sprays [src] into the face of [target]!</span>")
|
||||
target << "<span class='userdanger'>[user] sprays [src] into your face!</span>"
|
||||
to_chat(target, "<span class='userdanger'>[user] sprays [src] into your face!</span>")
|
||||
|
||||
if(C.client)
|
||||
C.blur_eyes(3)
|
||||
@@ -651,9 +649,9 @@
|
||||
if(actually_paints)
|
||||
target.add_atom_colour(paint_color, WASHABLE_COLOUR_PRIORITY)
|
||||
if(color_hex2num(paint_color) < 255)
|
||||
target.SetOpacity(255)
|
||||
target.set_opacity(255)
|
||||
else
|
||||
target.SetOpacity(initial(target.opacity))
|
||||
target.set_opacity(initial(target.opacity))
|
||||
. = use_charges(2)
|
||||
var/fraction = min(1, . / reagents.maximum_volume)
|
||||
reagents.reaction(target, TOUCH, fraction * volume_multiplier)
|
||||
@@ -691,7 +689,7 @@
|
||||
/obj/item/toy/crayon/spraycan/gang/examine(mob/user)
|
||||
. = ..()
|
||||
if((user.mind && user.mind.gang_datum) || isobserver(user))
|
||||
user << "This spraycan has been specially modified for tagging territory."
|
||||
to_chat(user, "This spraycan has been specially modified for tagging territory.")
|
||||
|
||||
/obj/item/toy/crayon/spraycan/borg
|
||||
name = "cyborg spraycan"
|
||||
@@ -701,7 +699,7 @@
|
||||
/obj/item/toy/crayon/spraycan/borg/afterattack(atom/target,mob/user,proximity)
|
||||
var/diff = ..()
|
||||
if(!iscyborg(user))
|
||||
user << "<span class='notice'>How did you get this?</span>"
|
||||
to_chat(user, "<span class='notice'>How did you get this?</span>")
|
||||
qdel(src)
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -13,19 +13,10 @@
|
||||
/obj/item/toy/carpplushie/dehy_carp/attack_self(mob/user)
|
||||
src.add_fingerprint(user) //Anyone can add their fingerprints to it with this
|
||||
if(!owned)
|
||||
user << "<span class='notice'>You pet [src]. You swear it looks up at you.</span>"
|
||||
to_chat(user, "<span class='notice'>You pet [src]. You swear it looks up at you.</span>")
|
||||
owner = user
|
||||
owned = 1
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/toy/carpplushie/dehy_carp/afterattack(obj/O, mob/user,proximity)
|
||||
if(!proximity) return
|
||||
if(istype(O,/obj/structure/sink))
|
||||
user.drop_item()
|
||||
loc = get_turf(O)
|
||||
return Swell()
|
||||
..()
|
||||
else return ..()
|
||||
|
||||
/obj/item/toy/carpplushie/dehy_carp/proc/Swell()
|
||||
desc = "It's growing!"
|
||||
|
||||
@@ -57,26 +57,11 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/obj/item/inserted_item //Used for pen, crayon, and lipstick insertion or removal. Same as above.
|
||||
var/overlays_x_offset = 0 //x offset to use for certain overlays
|
||||
|
||||
/obj/item/device/pda/pickup(mob/user)
|
||||
..()
|
||||
if(fon)
|
||||
SetLuminosity(0)
|
||||
user.AddLuminosity(f_lum)
|
||||
|
||||
/obj/item/device/pda/dropped(mob/user)
|
||||
..()
|
||||
if(fon)
|
||||
user.AddLuminosity(-f_lum)
|
||||
SetLuminosity(f_lum)
|
||||
|
||||
/obj/item/device/pda/New()
|
||||
..()
|
||||
if(fon)
|
||||
if(!isturf(loc))
|
||||
loc.AddLuminosity(f_lum)
|
||||
SetLuminosity(0)
|
||||
else
|
||||
SetLuminosity(f_lum)
|
||||
set_light(f_lum)
|
||||
|
||||
PDAs += src
|
||||
if(default_cartridge)
|
||||
cartridge = new default_cartridge(src)
|
||||
@@ -344,7 +329,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if("Eject")//Ejects the cart, only done from hub.
|
||||
if (!isnull(cartridge))
|
||||
U.put_in_hands(cartridge)
|
||||
U << "<span class='notice'>You remove [cartridge] from [src].</span>"
|
||||
to_chat(U, "<span class='notice'>You remove [cartridge] from [src].</span>")
|
||||
scanmode = 0
|
||||
if (cartridge.radio)
|
||||
cartridge.radio.hostpda = null
|
||||
@@ -372,16 +357,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if("Light")
|
||||
if(fon)
|
||||
fon = 0
|
||||
if(src in U.contents)
|
||||
U.AddLuminosity(-f_lum)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
else
|
||||
fon = 1
|
||||
if(src in U.contents)
|
||||
U.AddLuminosity(f_lum)
|
||||
else
|
||||
SetLuminosity(f_lum)
|
||||
set_light(2.3)
|
||||
update_icon()
|
||||
if("Medical Scan")
|
||||
if(scanmode == 1)
|
||||
@@ -417,7 +396,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(A && alert_s)
|
||||
var/msg = "<span class='boldnotice'>NON-DRONE PING: [U.name]: [alert_s] priority alert in [A.name]!</span>"
|
||||
_alert_drones(msg, TRUE)
|
||||
U << msg
|
||||
to_chat(U, msg)
|
||||
|
||||
|
||||
//NOTEKEEPER FUNCTIONS===================================
|
||||
@@ -447,7 +426,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(t)
|
||||
if(hidden_uplink && (trim(lowertext(t)) == trim(lowertext(lock_code))))
|
||||
hidden_uplink.interact(U)
|
||||
U << "The PDA softly beeps."
|
||||
to_chat(U, "The PDA softly beeps.")
|
||||
U << browse(null, "window=pda")
|
||||
src.mode = 0
|
||||
else
|
||||
@@ -472,7 +451,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
U.show_message("<span class='notice'>Virus sent!</span>", 1)
|
||||
P.honkamt = (rand(15,20))
|
||||
else
|
||||
U << "PDA not found."
|
||||
to_chat(U, "PDA not found.")
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
@@ -486,7 +465,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
P.silent = 1
|
||||
P.ttone = "silence"
|
||||
else
|
||||
U << "PDA not found."
|
||||
to_chat(U, "PDA not found.")
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
@@ -528,7 +507,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
U.show_message("<span class='notice'>Success!</span>", 1)
|
||||
P.explode()
|
||||
else
|
||||
U << "PDA not found."
|
||||
to_chat(U, "PDA not found.")
|
||||
else
|
||||
U.unset_machine()
|
||||
U << browse(null, "window=pda")
|
||||
@@ -577,7 +556,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if (ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.put_in_hands(id)
|
||||
usr << "<span class='notice'>You remove the ID from the [name].</span>"
|
||||
to_chat(usr, "<span class='notice'>You remove the ID from the [name].</span>")
|
||||
else
|
||||
id.loc = get_turf(src)
|
||||
id = null
|
||||
@@ -624,7 +603,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
log_pda("[user] (PDA: [src.name]) sent \"[message]\" to [P.name]")
|
||||
else
|
||||
if(!multiple)
|
||||
user << "<span class='notice'>ERROR: Server isn't responding.</span>"
|
||||
to_chat(user, "<span class='notice'>ERROR: Server isn't responding.</span>")
|
||||
return
|
||||
photo = null
|
||||
|
||||
@@ -651,7 +630,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
L = get(src, /mob/living/silicon)
|
||||
|
||||
if(L && L.stat != UNCONSCIOUS)
|
||||
L << "\icon[src] <b>Message from [source.owner] ([source.ownjob]), </b>\"[msg.message]\"[msg.get_photo_ref()] (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[source]'>Reply</a>)"
|
||||
to_chat(L, "\icon[src] <b>Message from [source.owner] ([source.ownjob]), </b>\"[msg.message]\"[msg.get_photo_ref()] (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[source]'>Reply</a>)")
|
||||
|
||||
update_icon()
|
||||
add_overlay(image(icon, icon_alert))
|
||||
@@ -660,7 +639,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
for(var/mob/M in player_list)
|
||||
if(isobserver(M) && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTPDA))
|
||||
var/link = FOLLOW_LINK(M, user)
|
||||
M << "[link] <span class='name'>[msg.sender] </span><span class='game say'>PDA Message</span> --> <span class='name'>[multiple ? "Everyone" : msg.recipient]</span>: <span class='message'>[msg.message][msg.get_photo_ref()]</span></span>"
|
||||
to_chat(M, "[link] <span class='name'>[msg.sender] </span><span class='game say'>PDA Message</span> --> <span class='name'>[multiple ? "Everyone" : msg.recipient]</span>: <span class='message'>[msg.message][msg.get_photo_ref()]</span></span>")
|
||||
|
||||
/obj/item/device/pda/proc/can_send(obj/item/device/pda/P)
|
||||
if(!P || QDELETED(P) || P.toff)
|
||||
@@ -723,7 +702,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(id)
|
||||
remove_id()
|
||||
else
|
||||
usr << "<span class='warning'>This PDA does not have an ID in it!</span>"
|
||||
to_chat(usr, "<span class='warning'>This PDA does not have an ID in it!</span>")
|
||||
|
||||
/obj/item/device/pda/verb/verb_remove_pen()
|
||||
set category = "Object"
|
||||
@@ -743,11 +722,11 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
M.put_in_hands(inserted_item)
|
||||
else
|
||||
inserted_item.forceMove(loc)
|
||||
usr << "<span class='notice'>You remove \the [inserted_item] from \the [src].</span>"
|
||||
to_chat(usr, "<span class='notice'>You remove \the [inserted_item] from \the [src].</span>")
|
||||
inserted_item = null
|
||||
update_icon()
|
||||
else
|
||||
usr << "<span class='warning'>This PDA does not have a pen in it!</span>"
|
||||
to_chat(usr, "<span class='warning'>This PDA does not have a pen in it!</span>")
|
||||
|
||||
//trying to insert or remove an id
|
||||
/obj/item/device/pda/proc/id_check(mob/user, obj/item/weapon/card/id/I)
|
||||
@@ -776,7 +755,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(!user.transferItemToLoc(C, src))
|
||||
return
|
||||
cartridge = C
|
||||
user << "<span class='notice'>You insert [cartridge] into [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You insert [cartridge] into [src].</span>")
|
||||
if(cartridge.radio)
|
||||
cartridge.radio.hostpda = src
|
||||
update_icon()
|
||||
@@ -784,19 +763,19 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
else if(istype(C, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/idcard = C
|
||||
if(!idcard.registered_name)
|
||||
user << "<span class='warning'>\The [src] rejects the ID!</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] rejects the ID!</span>")
|
||||
return
|
||||
if(!owner)
|
||||
owner = idcard.registered_name
|
||||
ownjob = idcard.assignment
|
||||
update_label()
|
||||
user << "<span class='notice'>Card scanned.</span>"
|
||||
to_chat(user, "<span class='notice'>Card scanned.</span>")
|
||||
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) || (isturf(loc) && in_range(src, user))) && (C in user.contents))
|
||||
if(!id_check(user, idcard))
|
||||
return
|
||||
user << "<span class='notice'>You put the ID into \the [src]'s slot.</span>"
|
||||
to_chat(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.
|
||||
@@ -804,22 +783,22 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(!user.transferItemToLoc(C, src))
|
||||
return
|
||||
pai = C
|
||||
user << "<span class='notice'>You slot \the [C] into [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You slot \the [C] into [src].</span>")
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
else if(is_type_in_list(C, contained_item)) //Checks if there is a pen
|
||||
if(inserted_item)
|
||||
user << "<span class='warning'>There is already \a [inserted_item] in \the [src]!</span>"
|
||||
to_chat(user, "<span class='warning'>There is already \a [inserted_item] in \the [src]!</span>")
|
||||
else
|
||||
if(!user.transferItemToLoc(C, src))
|
||||
return
|
||||
user << "<span class='notice'>You slide \the [C] into \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You slide \the [C] into \the [src].</span>")
|
||||
inserted_item = C
|
||||
update_icon()
|
||||
else if(istype(C, /obj/item/weapon/photo))
|
||||
var/obj/item/weapon/photo/P = C
|
||||
photo = P.img
|
||||
user << "<span class='notice'>You scan \the [C].</span>"
|
||||
to_chat(user, "<span class='notice'>You scan \the [C].</span>")
|
||||
else if(hidden_uplink && hidden_uplink.active)
|
||||
hidden_uplink.attackby(C, user, params)
|
||||
else
|
||||
@@ -854,13 +833,13 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(!isnull(A.reagents))
|
||||
if(A.reagents.reagent_list.len > 0)
|
||||
var/reagents_length = A.reagents.reagent_list.len
|
||||
user << "<span class='notice'>[reagents_length] chemical agent[reagents_length > 1 ? "s" : ""] found.</span>"
|
||||
to_chat(user, "<span class='notice'>[reagents_length] chemical agent[reagents_length > 1 ? "s" : ""] found.</span>")
|
||||
for (var/re in A.reagents.reagent_list)
|
||||
user << "<span class='notice'>\t [re]</span>"
|
||||
to_chat(user, "<span class='notice'>\t [re]</span>")
|
||||
else
|
||||
user << "<span class='notice'>No active chemical agents found in [A].</span>"
|
||||
to_chat(user, "<span class='notice'>No active chemical agents found in [A].</span>")
|
||||
else
|
||||
user << "<span class='notice'>No significant chemical agents found in [A].</span>"
|
||||
to_chat(user, "<span class='notice'>No significant chemical agents found in [A].</span>")
|
||||
|
||||
if(5)
|
||||
if (istype(A, /obj/item/weapon/tank))
|
||||
@@ -884,7 +863,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if (!scanmode && istype(A, /obj/item/weapon/paper) && owner)
|
||||
var/obj/item/weapon/paper/PP = A
|
||||
if (!PP.info)
|
||||
user << "<span class='warning'>Unable to scan! Paper is blank.</span>"
|
||||
to_chat(user, "<span class='warning'>Unable to scan! Paper is blank.</span>")
|
||||
return
|
||||
notehtml = PP.info
|
||||
note = replacetext(notehtml, "<BR>", "\[br\]")
|
||||
@@ -893,7 +872,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
note = replacetext(note, "</ul>", "\[/list\]")
|
||||
note = html_encode(note)
|
||||
notescanned = 1
|
||||
user << "<span class='notice'>Paper scanned. Saved to PDA's notekeeper.</span>" //concept of scanning paper copyright brainoblivion 2009
|
||||
to_chat(user, "<span class='notice'>Paper scanned. Saved to PDA's notekeeper.</span>" )
|
||||
|
||||
|
||||
/obj/item/device/pda/proc/explode() //This needs tuning.
|
||||
@@ -941,7 +920,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return //won't work if dead
|
||||
|
||||
if(src.aiPDA.toff)
|
||||
user << "Turn on your receiver in order to send messages."
|
||||
to_chat(user, "Turn on your receiver in order to send messages.")
|
||||
return
|
||||
|
||||
for (var/obj/item/device/pda/P in get_viewable_pdas())
|
||||
@@ -974,9 +953,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return //won't work if dead
|
||||
if(!isnull(aiPDA))
|
||||
aiPDA.toff = !aiPDA.toff
|
||||
usr << "<span class='notice'>PDA sender/receiver toggled [(aiPDA.toff ? "Off" : "On")]!</span>"
|
||||
to_chat(usr, "<span class='notice'>PDA sender/receiver toggled [(aiPDA.toff ? "Off" : "On")]!</span>")
|
||||
else
|
||||
usr << "You do not have a PDA. You should make an issue report about this."
|
||||
to_chat(usr, "You do not have a PDA. You should make an issue report about this.")
|
||||
|
||||
/mob/living/silicon/ai/verb/cmd_toggle_pda_silent()
|
||||
set category = "AI Commands"
|
||||
@@ -986,9 +965,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(!isnull(aiPDA))
|
||||
//0
|
||||
aiPDA.silent = !aiPDA.silent
|
||||
usr << "<span class='notice'>PDA ringer toggled [(aiPDA.silent ? "Off" : "On")]!</span>"
|
||||
to_chat(usr, "<span class='notice'>PDA ringer toggled [(aiPDA.silent ? "Off" : "On")]!</span>")
|
||||
else
|
||||
usr << "You do not have a PDA. You should make an issue report about this."
|
||||
to_chat(usr, "You do not have a PDA. You should make an issue report about this.")
|
||||
|
||||
/mob/living/silicon/ai/proc/cmd_show_message_log(mob/user)
|
||||
if(user.stat == 2)
|
||||
@@ -997,7 +976,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/HTML = "<html><head><title>AI PDA Message Log</title></head><body>[aiPDA.tnote]</body></html>"
|
||||
user << browse(HTML, "window=log;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0")
|
||||
else
|
||||
user << "You do not have a PDA. You should make an issue report about this."
|
||||
to_chat(user, "You do not have a PDA. You should make an issue report about this.")
|
||||
|
||||
/obj/item/weapon/storage/box/PDAs/New()
|
||||
..()
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
if(confirm == "Yes" && !..())
|
||||
flush = TRUE
|
||||
if(AI && AI.loc == src)
|
||||
AI << "Your core files are being wiped!"
|
||||
to_chat(AI, "Your core files are being wiped!")
|
||||
while(AI.stat != DEAD && flush)
|
||||
AI.adjustOxyLoss(1)
|
||||
AI.updatehealth()
|
||||
@@ -78,10 +78,10 @@
|
||||
. = TRUE
|
||||
if("wireless")
|
||||
AI.control_disabled = !AI.control_disabled
|
||||
AI << "[src]'s wireless port has been [AI.control_disabled ? "disabled" : "enabled"]!"
|
||||
to_chat(AI, "[src]'s wireless port has been [AI.control_disabled ? "disabled" : "enabled"]!")
|
||||
. = TRUE
|
||||
if("radio")
|
||||
AI.radio_enabled = !AI.radio_enabled
|
||||
AI << "Your Subspace Transceiver has been [AI.radio_enabled ? "enabled" : "disabled"]!"
|
||||
to_chat(AI, "Your Subspace Transceiver has been [AI.radio_enabled ? "enabled" : "disabled"]!")
|
||||
. = TRUE
|
||||
update_icon()
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
return 0
|
||||
var/turf/T = get_turf(user.loc)
|
||||
if(T.z != current.z || !current.can_use())
|
||||
user << "<span class='danger'>[src] has lost the signal.</span>"
|
||||
to_chat(user, "<span class='danger'>[src] has lost the signal.</span>")
|
||||
current = null
|
||||
user.unset_machine()
|
||||
return 0
|
||||
@@ -233,11 +233,11 @@
|
||||
var/obj/machinery/camera/C = locate(href_list["view"]) in cameras
|
||||
if(C && istype(C))
|
||||
if(!C.can_use())
|
||||
usr << "<span class='warning'>Something's wrong with that camera! You can't get a feed.</span>"
|
||||
to_chat(usr, "<span class='warning'>Something's wrong with that camera! You can't get a feed.</span>")
|
||||
return
|
||||
var/turf/T = get_turf(loc)
|
||||
if(!T || C.z != T.z)
|
||||
usr << "<span class='warning'>You can't get a signal!</span>"
|
||||
to_chat(usr, "<span class='warning'>You can't get a signal!</span>")
|
||||
return
|
||||
current = C
|
||||
spawn(6)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if(!active_dummy)
|
||||
if(istype(target,/obj/item) && !istype(target, /obj/item/weapon/disk/nuclear))
|
||||
playsound(get_turf(src), 'sound/weapons/flash.ogg', 100, 1, -6)
|
||||
user << "<span class='notice'>Scanned [target].</span>"
|
||||
to_chat(user, "<span class='notice'>Scanned [target].</span>")
|
||||
var/obj/temp = new/obj()
|
||||
temp.appearance = target.appearance
|
||||
temp.layer = initial(target.layer) // scanning things in your inventory
|
||||
@@ -48,19 +48,19 @@
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
|
||||
qdel(active_dummy)
|
||||
active_dummy = null
|
||||
usr << "<span class='notice'>You deactivate \the [src].</span>"
|
||||
to_chat(usr, "<span class='notice'>You deactivate \the [src].</span>")
|
||||
new /obj/effect/overlay/temp/emp/pulse(get_turf(src))
|
||||
else
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
|
||||
var/obj/effect/dummy/chameleon/C = new/obj/effect/dummy/chameleon(usr.loc)
|
||||
C.activate(usr, saved_appearance, src)
|
||||
usr << "<span class='notice'>You activate \the [src].</span>"
|
||||
to_chat(usr, "<span class='notice'>You activate \the [src].</span>")
|
||||
new /obj/effect/overlay/temp/emp/pulse(get_turf(src))
|
||||
|
||||
/obj/item/device/chameleon/proc/disrupt(delete_dummy = 1)
|
||||
if(active_dummy)
|
||||
for(var/mob/M in active_dummy)
|
||||
M << "<span class='danger'>Your chameleon-projector deactivates.</span>"
|
||||
to_chat(M, "<span class='danger'>Your chameleon-projector deactivates.</span>")
|
||||
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
@@ -35,6 +35,6 @@
|
||||
/obj/item/device/doorCharge/examine(mob/user)
|
||||
..()
|
||||
if(user.mind in ticker.mode.traitors) //No nuke ops because the device is excluded from nuclear
|
||||
user << "A small explosive device that can be used to sabotage airlocks to cause an explosion upon opening. To apply, remove the airlock's maintenance panel and place it within."
|
||||
to_chat(user, "A small explosive device that can be used to sabotage airlocks to cause an explosion upon opening. To apply, remove the airlock's maintenance panel and place it within.")
|
||||
else
|
||||
user << "A small, suspicious object that feels lukewarm when held."
|
||||
to_chat(user, "A small, suspicious object that feels lukewarm when held.")
|
||||
|
||||
@@ -10,30 +10,23 @@
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=20)
|
||||
actions_types = list(/datum/action/item_action/toggle_light)
|
||||
var/on = 0
|
||||
var/brightness_on = 4 //luminosity when on
|
||||
var/brightness_on = 4 //range of light when on
|
||||
var/flashlight_power //strength of the light when on. optional
|
||||
|
||||
/obj/item/device/flashlight/Initialize()
|
||||
..()
|
||||
if(on)
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
SetLuminosity(brightness_on)
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
SetLuminosity(0)
|
||||
update_brightness()
|
||||
|
||||
/obj/item/device/flashlight/proc/update_brightness(mob/user = null)
|
||||
if(on)
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
if(loc == user)
|
||||
user.AddLuminosity(brightness_on)
|
||||
else if(isturf(loc))
|
||||
SetLuminosity(brightness_on)
|
||||
if(flashlight_power)
|
||||
set_light(l_range = brightness_on, l_power = flashlight_power)
|
||||
else
|
||||
set_light(brightness_on)
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
if(loc == user)
|
||||
user.AddLuminosity(-brightness_on)
|
||||
else if(isturf(loc))
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
|
||||
/obj/item/device/flashlight/attack_self(mob/user)
|
||||
on = !on
|
||||
@@ -52,12 +45,12 @@
|
||||
return ..() //just hit them in the head
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = M //mob has protective eyewear
|
||||
if(ishuman(M) && ((H.head && H.head.flags_cover & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) || (H.glasses && H.glasses.flags_cover & GLASSESCOVERSEYES)))
|
||||
user << "<span class='notice'>You're going to need to remove that [(H.head && H.head.flags_cover & HEADCOVERSEYES) ? "helmet" : (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) ? "mask": "glasses"] first.</span>"
|
||||
to_chat(user, "<span class='notice'>You're going to need to remove that [(H.head && H.head.flags_cover & HEADCOVERSEYES) ? "helmet" : (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) ? "mask": "glasses"] first.</span>")
|
||||
return
|
||||
|
||||
if(M == user) //they're using it on themselves
|
||||
@@ -71,30 +64,15 @@
|
||||
var/mob/living/carbon/C = M
|
||||
if(istype(C))
|
||||
if(C.stat == DEAD || (C.disabilities & BLIND)) //mob is dead or fully blind
|
||||
user << "<span class='warning'>[C] pupils don't react to the light!</span>"
|
||||
to_chat(user, "<span class='warning'>[C] pupils don't react to the light!</span>")
|
||||
else if(C.dna.check_mutation(XRAY)) //mob has X-RAY vision
|
||||
user << "<span class='danger'>[C] pupils give an eerie glow!</span>"
|
||||
to_chat(user, "<span class='danger'>[C] pupils give an eerie glow!</span>")
|
||||
else //they're okay!
|
||||
if(C.flash_act(visual = 1))
|
||||
user << "<span class='notice'>[C]'s pupils narrow.</span>"
|
||||
to_chat(user, "<span class='notice'>[C]'s pupils narrow.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/device/flashlight/pickup(mob/user)
|
||||
..()
|
||||
if(on)
|
||||
user.AddLuminosity(brightness_on)
|
||||
SetLuminosity(0)
|
||||
|
||||
|
||||
/obj/item/device/flashlight/dropped(mob/user)
|
||||
..()
|
||||
if(on)
|
||||
user.AddLuminosity(-brightness_on)
|
||||
SetLuminosity(brightness_on)
|
||||
|
||||
|
||||
/obj/item/device/flashlight/pen
|
||||
name = "penlight"
|
||||
desc = "A pen-sized light, used by medical staff. It can also be used to create a hologram to alert people of incoming medical assistance."
|
||||
@@ -107,7 +85,7 @@
|
||||
/obj/item/device/flashlight/pen/afterattack(atom/target, mob/user, proximity_flag)
|
||||
if(!proximity_flag)
|
||||
if(holo_cooldown > world.time)
|
||||
user << "<span class='warning'>[src] is not ready yet!</span>"
|
||||
to_chat(user, "<span class='warning'>[src] is not ready yet!</span>")
|
||||
return
|
||||
var/T = get_turf(target)
|
||||
if(locate(/mob/living) in T)
|
||||
@@ -188,6 +166,7 @@
|
||||
var/on_damage = 7
|
||||
var/produce_heat = 1500
|
||||
heat = 1000
|
||||
light_color = LIGHT_COLOR_FLARE
|
||||
|
||||
/obj/item/device/flashlight/flare/New()
|
||||
fuel = rand(800, 1000) // Sorry for changing this so much but I keep under-estimating how long X number of ticks last in seconds.
|
||||
@@ -230,9 +209,10 @@
|
||||
|
||||
// Usual checks
|
||||
if(!fuel)
|
||||
user << "<span class='warning'>It's out of fuel!</span>"
|
||||
to_chat(user, "<span class='warning'>[src] is out of fuel!</span>")
|
||||
return
|
||||
if(on)
|
||||
to_chat(user, "<span class='notice'>[src] is already on.</span>")
|
||||
return
|
||||
|
||||
. = ..()
|
||||
@@ -284,19 +264,20 @@
|
||||
|
||||
|
||||
/obj/item/device/flashlight/emp/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/flashlight/emp/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/flashlight/emp/process()
|
||||
charge_tick++
|
||||
if(charge_tick < 10) return 0
|
||||
charge_tick = 0
|
||||
emp_cur_charges = min(emp_cur_charges+1, emp_max_charges)
|
||||
return 1
|
||||
charge_tick++
|
||||
if(charge_tick < 10)
|
||||
return FALSE
|
||||
charge_tick = 0
|
||||
emp_cur_charges = min(emp_cur_charges+1, emp_max_charges)
|
||||
return TRUE
|
||||
|
||||
/obj/item/device/flashlight/emp/attack(mob/living/M, mob/living/user)
|
||||
if(on && user.zone_selected == "eyes") // call original attack proc only if aiming at the eyes
|
||||
@@ -317,8 +298,114 @@
|
||||
"<span class='userdanger'>[user] blinks \the [src] at you.")
|
||||
else
|
||||
A.visible_message("<span class='danger'>[user] blinks \the [src] at \the [A].")
|
||||
user << "\The [src] now has [emp_cur_charges] charge\s."
|
||||
to_chat(user, "\The [src] now has [emp_cur_charges] charge\s.")
|
||||
A.emp_act(1)
|
||||
else
|
||||
user << "<span class='warning'>\The [src] needs time to recharge!</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] needs time to recharge!</span>")
|
||||
return
|
||||
|
||||
// Glowsticks, in the uncomfortable range of similar to flares,
|
||||
// but not similar enough to make it worth a refactor
|
||||
/obj/item/device/flashlight/glowstick
|
||||
name = "green glowstick"
|
||||
desc = "A military-grade glowstick."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
brightness_on = 4
|
||||
color = LIGHT_COLOR_GREEN
|
||||
icon_state = "glowstick"
|
||||
item_state = "glowstick"
|
||||
var/fuel = 0
|
||||
|
||||
/obj/item/device/flashlight/glowstick/Initialize()
|
||||
fuel = rand(1600, 2000)
|
||||
light_color = color
|
||||
..()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/process()
|
||||
fuel = max(fuel - 1, 0)
|
||||
if(!fuel)
|
||||
turn_off()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/proc/turn_off()
|
||||
on = 0
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/update_icon()
|
||||
item_state = "glowstick"
|
||||
overlays.Cut()
|
||||
if(!fuel)
|
||||
icon_state = "glowstick-empty"
|
||||
cut_overlays()
|
||||
set_light(0)
|
||||
else if(on)
|
||||
var/image/I = image(icon,"glowstick-glow",color)
|
||||
add_overlay(I)
|
||||
item_state = "glowstick-on"
|
||||
set_light(brightness_on)
|
||||
else
|
||||
icon_state = "glowstick"
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/attack_self(mob/user)
|
||||
if(!fuel)
|
||||
to_chat(user, "<span class='notice'>[src] is spent.</span>")
|
||||
return
|
||||
if(on)
|
||||
to_chat(user, "<span class='notice'>[src] is already lit.</span>")
|
||||
return
|
||||
|
||||
. = ..()
|
||||
if(.)
|
||||
user.visible_message("<span class='notice'>[user] cracks and shakes [src].</span>", "<span class='notice'>You crack and shake [src], turning it on!</span>")
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/flashlight/glowstick/red
|
||||
name = "red glowstick"
|
||||
color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/item/device/flashlight/glowstick/blue
|
||||
name = "blue glowstick"
|
||||
color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/item/device/flashlight/glowstick/cyan
|
||||
name = "cyan glowstick"
|
||||
color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/item/device/flashlight/glowstick/orange
|
||||
name = "orange glowstick"
|
||||
color = LIGHT_COLOR_ORANGE
|
||||
|
||||
/obj/item/device/flashlight/glowstick/yellow
|
||||
name = "yellow glowstick"
|
||||
color = LIGHT_COLOR_YELLOW
|
||||
|
||||
/obj/item/device/flashlight/glowstick/pink
|
||||
name = "pink glowstick"
|
||||
color = LIGHT_COLOR_PINK
|
||||
|
||||
/obj/item/device/flashlight/glowstick/random
|
||||
name = "random colored glowstick"
|
||||
|
||||
/obj/item/device/flashlight/glowstick/random/Initialize()
|
||||
var/list/glowtypes = typesof(/obj/item/device/flashlight/glowstick)
|
||||
glowtypes -= /obj/item/device/flashlight/glowstick/random
|
||||
|
||||
var/obj/item/device/flashlight/glowstick/glowtype = pick(glowtypes)
|
||||
|
||||
name = initial(glowtype.name)
|
||||
color = initial(glowtype.color)
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/flashlight/flashdark
|
||||
name = "flashdark"
|
||||
desc = "A strange device manufactured with mysterious elements that somehow emits darkness. Or maybe it just sucks in light? Nobody knows for sure."
|
||||
icon_state = "flashdark"
|
||||
item_state = "flashdark"
|
||||
brightness_on = 2.5
|
||||
flashlight_power = -3
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
/obj/item/device/forcefield
|
||||
name = "forcefield projector"
|
||||
desc = "An experimental device that can create several forcefields at a distance."
|
||||
icon_state = "signmaker_engi"
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags = NOBLUDGEON
|
||||
item_state = "electronic"
|
||||
materials = list(MAT_METAL=250, MAT_GLASS=500)
|
||||
origin_tech = "magnets=5;engineering=5;powerstorage=4"
|
||||
var/max_shield_integrity = 250
|
||||
var/shield_integrity = 250
|
||||
var/max_fields = 3
|
||||
var/list/current_fields
|
||||
var/field_distance_limit = 7
|
||||
|
||||
/obj/item/device/forcefield/afterattack(atom/target, mob/user, proximity_flag)
|
||||
if(!check_allowed_items(target, 1))
|
||||
return
|
||||
if(istype(target, /obj/structure/projected_forcefield))
|
||||
var/obj/structure/projected_forcefield/F = target
|
||||
if(F.generator == src)
|
||||
to_chat(user, "<span class='notice'>You deactivate [F].</span>")
|
||||
qdel(F)
|
||||
return
|
||||
var/turf/T = get_turf(target)
|
||||
if(T.density)
|
||||
return
|
||||
if(get_dist(T,src) > field_distance_limit)
|
||||
return
|
||||
if(LAZYLEN(current_fields) >= max_fields)
|
||||
to_chat(user, "<span class='notice'>[src] cannot sustain any more forcefields!</span>")
|
||||
return
|
||||
|
||||
playsound(src,'sound/weapons/resonator_fire.ogg',50,1)
|
||||
user.visible_message("<span class='warning'>[user] projects a forcefield!</span>","<span class='notice'>You project a forcefield.</span>")
|
||||
var/obj/structure/projected_forcefield/F = new(T, src)
|
||||
current_fields += F
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
/obj/item/device/forcefield/attack_self(mob/user)
|
||||
if(LAZYLEN(current_fields))
|
||||
to_chat(user, "<span class='notice'>You deactivate [src], disabling all active forcefields.</span>")
|
||||
for(var/obj/structure/projected_forcefield/F in current_fields)
|
||||
qdel(F)
|
||||
|
||||
/obj/item/device/forcefield/examine(mob/user)
|
||||
..()
|
||||
var/percent_charge = round((shield_integrity/max_shield_integrity)*100)
|
||||
to_chat(user, "<span class='notice'>It is currently sustaining [LAZYLEN(current_fields)]/[max_fields] fields, and it's [percent_charge]% charged.</span>")
|
||||
|
||||
/obj/item/device/forcefield/Initialize(mapload)
|
||||
..()
|
||||
current_fields = list()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/forcefield/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/forcefield/process()
|
||||
if(!LAZYLEN(current_fields))
|
||||
shield_integrity = min(shield_integrity + 4, max_shield_integrity)
|
||||
else
|
||||
shield_integrity = max(shield_integrity - LAZYLEN(current_fields), 0) //fields degrade slowly over time
|
||||
for(var/obj/structure/projected_forcefield/F in current_fields)
|
||||
if(shield_integrity <= 0 || get_dist(F,src) > field_distance_limit)
|
||||
qdel(F)
|
||||
|
||||
/obj/structure/projected_forcefield
|
||||
name = "forcefield"
|
||||
desc = "A glowing barrier, generated by a projector nearby. It could be overloaded if hit enough times."
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "forcefield"
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
mouse_opacity = 2
|
||||
obj_integrity = INFINITY
|
||||
max_integrity = INFINITY
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
armor = list(melee = 0, bullet = 25, laser = 50, energy = 50, bomb = 25, bio = 100, rad = 100, fire = 100, acid = 100)
|
||||
var/obj/item/device/forcefield/generator
|
||||
|
||||
/obj/structure/projected_forcefield/Initialize(mapload, obj/item/device/forcefield/origin)
|
||||
generator = origin
|
||||
..()
|
||||
|
||||
/obj/structure/projected_forcefield/Destroy()
|
||||
visible_message("<span class='warning'>[src] flickers and disappears!</span>")
|
||||
playsound(src,'sound/weapons/resonator_blast.ogg',25,1)
|
||||
generator.current_fields -= src
|
||||
generator = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/projected_forcefield/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return 1
|
||||
return !density
|
||||
|
||||
/obj/structure/projected_forcefield/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1)
|
||||
|
||||
/obj/structure/projected_forcefield/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
if(sound_effect)
|
||||
play_attack_sound(damage_amount, damage_type, damage_flag)
|
||||
generator.shield_integrity = max(generator.shield_integrity - damage_amount, 0)
|
||||
@@ -37,23 +37,23 @@
|
||||
..()
|
||||
if(!scanning)
|
||||
return 1
|
||||
user << "<span class='info'>Alt-click it to clear stored radiation levels.</span>"
|
||||
to_chat(user, "<span class='info'>Alt-click it to clear stored radiation levels.</span>")
|
||||
if(emagged)
|
||||
user << "<span class='warning'>The display seems to be incomprehensible.</span>"
|
||||
to_chat(user, "<span class='warning'>The display seems to be incomprehensible.</span>")
|
||||
return 1
|
||||
switch(radiation_count)
|
||||
if(-INFINITY to RAD_LEVEL_NORMAL)
|
||||
user << "<span class='notice'>Ambient radiation level count reports that all is well.</span>"
|
||||
to_chat(user, "<span class='notice'>Ambient radiation level count reports that all is well.</span>")
|
||||
if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
|
||||
user << "<span class='disarm'>Ambient radiation levels slightly above average.</span>"
|
||||
to_chat(user, "<span class='disarm'>Ambient radiation levels slightly above average.</span>")
|
||||
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
|
||||
user << "<span class='warning'>Ambient radiation levels above average.</span>"
|
||||
to_chat(user, "<span class='warning'>Ambient radiation levels above average.</span>")
|
||||
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
|
||||
user << "<span class='danger'>Ambient radiation levels highly above average.</span>"
|
||||
to_chat(user, "<span class='danger'>Ambient radiation levels highly above average.</span>")
|
||||
if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
|
||||
user << "<span class='suicide'>Ambient radiation levels nearing critical level.</span>"
|
||||
to_chat(user, "<span class='suicide'>Ambient radiation levels nearing critical level.</span>")
|
||||
if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
|
||||
user << "<span class='boldannounce'>Ambient radiation levels above critical level!</span>"
|
||||
to_chat(user, "<span class='boldannounce'>Ambient radiation levels above critical level!</span>")
|
||||
|
||||
/obj/item/device/geiger_counter/update_icon()
|
||||
if(!scanning)
|
||||
@@ -86,27 +86,27 @@
|
||||
if(isliving(loc))
|
||||
var/mob/living/M = loc
|
||||
if(!emagged)
|
||||
M << "<span class='boldannounce'>\icon[src] RADIATION PULSE DETECTED.</span>"
|
||||
M << "<span class='boldannounce'>\icon[src] Severity: [amount]</span>"
|
||||
to_chat(M, "<span class='boldannounce'>\icon[src] RADIATION PULSE DETECTED.</span>")
|
||||
to_chat(M, "<span class='boldannounce'>\icon[src] Severity: [amount]</span>")
|
||||
else
|
||||
M << "<span class='boldannounce'>\icon[src] !@%$AT!(N P!LS! D/TEC?ED.</span>"
|
||||
M << "<span class='boldannounce'>\icon[src] &!F2rity: <=[amount]#1</span>"
|
||||
to_chat(M, "<span class='boldannounce'>\icon[src] !@%$AT!(N P!LS! D/TEC?ED.</span>")
|
||||
to_chat(M, "<span class='boldannounce'>\icon[src] &!F2rity: <=[amount]#1</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/geiger_counter/attack_self(mob/user)
|
||||
scanning = !scanning
|
||||
update_icon()
|
||||
user << "<span class='notice'>\icon[src] You switch [scanning ? "on" : "off"] [src].</span>"
|
||||
to_chat(user, "<span class='notice'>\icon[src] You switch [scanning ? "on" : "off"] [src].</span>")
|
||||
|
||||
/obj/item/device/geiger_counter/attack(mob/living/M, mob/user)
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
if(!emagged)
|
||||
user.visible_message("<span class='notice'>[user] scans [M] with [src].</span>", "<span class='notice'>You scan [M]'s radiation levels with [src]...</span>")
|
||||
if(!M.radiation)
|
||||
user << "<span class='notice'>\icon[src] Radiation levels within normal boundaries.</span>"
|
||||
to_chat(user, "<span class='notice'>\icon[src] Radiation levels within normal boundaries.</span>")
|
||||
return 1
|
||||
else
|
||||
user << "<span class='boldannounce'>\icon[src] Subject is irradiated. Radiation levels: [M.radiation].</span>"
|
||||
to_chat(user, "<span class='boldannounce'>\icon[src] Subject is irradiated. Radiation levels: [M.radiation].</span>")
|
||||
return 1
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] scans [M] with [src].</span>", "<span class='danger'>You project [src]'s stored radiation into [M]'s body!</span>")
|
||||
@@ -118,7 +118,7 @@
|
||||
/obj/item/device/geiger_counter/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver) && emagged)
|
||||
if(scanning)
|
||||
user << "<span class='warning'>Turn off [src] before you perform this action!</span>"
|
||||
to_chat(user, "<span class='warning'>Turn off [src] before you perform this action!</span>")
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] unscrews [src]'s maintenance panel and begins fiddling with its innards...</span>", "<span class='notice'>You begin resetting [src]...</span>")
|
||||
playsound(user, I.usesound, 50, 1)
|
||||
@@ -137,18 +137,18 @@
|
||||
if(!istype(user) || user.incapacitated())
|
||||
return ..()
|
||||
if(!scanning)
|
||||
usr << "<span class='warning'>[src] must be on to reset its radiation level!</span>"
|
||||
to_chat(usr, "<span class='warning'>[src] must be on to reset its radiation level!</span>")
|
||||
return 0
|
||||
radiation_count = 0
|
||||
usr << "<span class='notice'>You flush [src]'s radiation counts, resetting it to normal.</span>"
|
||||
to_chat(usr, "<span class='notice'>You flush [src]'s radiation counts, resetting it to normal.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/geiger_counter/emag_act(mob/user)
|
||||
if(!emagged)
|
||||
if(scanning)
|
||||
user << "<span class='warning'>Turn off [src] before you perform this action!</span>"
|
||||
to_chat(user, "<span class='warning'>Turn off [src] before you perform this action!</span>")
|
||||
return 0
|
||||
user << "<span class='warning'>You override [src]'s radiation storing protocols. It will now generate small doses of radiation, and stored rads are now projected into creatures you scan.</span>"
|
||||
to_chat(user, "<span class='warning'>You override [src]'s radiation storing protocols. It will now generate small doses of radiation, and stored rads are now projected into creatures you scan.</span>")
|
||||
emagged = 1
|
||||
|
||||
#undef RAD_LEVEL_NORMAL
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
/obj/item/device/instrument/attack_self(mob/user)
|
||||
if(!user.IsAdvancedToolUser())
|
||||
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return 1
|
||||
interact(user)
|
||||
|
||||
|
||||
@@ -44,13 +44,13 @@
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
diode = W
|
||||
user << "<span class='notice'>You install a [diode.name] in [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You install a [diode.name] in [src].</span>")
|
||||
else
|
||||
user << "<span class='notice'>[src] already has a diode installed.</span>"
|
||||
to_chat(user, "<span class='notice'>[src] already has a diode installed.</span>")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(diode)
|
||||
user << "<span class='notice'>You remove the [diode.name] from \the [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You remove the [diode.name] from \the [src].</span>")
|
||||
diode.loc = get_turf(src.loc)
|
||||
diode = null
|
||||
else
|
||||
@@ -63,22 +63,22 @@
|
||||
if( !(user in (viewers(7,target))) )
|
||||
return
|
||||
if (!diode)
|
||||
user << "<span class='notice'>You point [src] at [target], but nothing happens!</span>"
|
||||
to_chat(user, "<span class='notice'>You point [src] at [target], but nothing happens!</span>")
|
||||
return
|
||||
if (!user.IsAdvancedToolUser())
|
||||
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.dna.check_mutation(HULK) || (NOGUNS in H.dna.species.species_traits))
|
||||
user << "<span class='warning'>Your fingers can't press the button!</span>"
|
||||
to_chat(user, "<span class='warning'>Your fingers can't press the button!</span>")
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
//nothing happens if the battery is drained
|
||||
if(recharge_locked)
|
||||
user << "<span class='notice'>You point [src] at [target], but it's still charging.</span>"
|
||||
to_chat(user, "<span class='notice'>You point [src] at [target], but it's still charging.</span>")
|
||||
return
|
||||
|
||||
var/outmsg
|
||||
@@ -109,7 +109,7 @@
|
||||
if(prob(effectchance * diode.rating))
|
||||
S.flash_act(affect_silicon = 1)
|
||||
S.Weaken(rand(5,10))
|
||||
S << "<span class='danger'>Your sensors were overloaded by a laser!</span>"
|
||||
to_chat(S, "<span class='danger'>Your sensors were overloaded by a laser!</span>")
|
||||
outmsg = "<span class='notice'>You overload [S] by shining [src] at their sensors.</span>"
|
||||
add_logs(user, S, "shone in the sensors", src)
|
||||
else
|
||||
@@ -139,9 +139,9 @@
|
||||
I.pixel_y = target.pixel_y + rand(-5,5)
|
||||
|
||||
if(outmsg)
|
||||
user << outmsg
|
||||
to_chat(user, outmsg)
|
||||
else
|
||||
user << "<span class='info'>You point [src] at [target].</span>"
|
||||
to_chat(user, "<span class='info'>You point [src] at [target].</span>")
|
||||
|
||||
energy -= 1
|
||||
if(energy <= max_energy)
|
||||
@@ -149,7 +149,7 @@
|
||||
recharging = 1
|
||||
START_PROCESSING(SSobj, src)
|
||||
if(energy <= 0)
|
||||
user << "<span class='warning'>[src]'s battery is overused, it needs time to recharge!</span>"
|
||||
to_chat(user, "<span class='warning'>[src]'s battery is overused, it needs time to recharge!</span>")
|
||||
recharge_locked = 1
|
||||
|
||||
flick_overlay_view(I, targloc, 10)
|
||||
|
||||
@@ -73,30 +73,30 @@
|
||||
|
||||
/obj/item/device/lightreplacer/examine(mob/user)
|
||||
..()
|
||||
user << status_string()
|
||||
to_chat(user, status_string())
|
||||
|
||||
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = W
|
||||
if(uses >= max_uses)
|
||||
user << "<span class='warning'>[src.name] is full.</span>"
|
||||
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
|
||||
return
|
||||
else if(G.use(decrement))
|
||||
AddUses(increment)
|
||||
user << "<span class='notice'>You insert a piece of glass into the [src.name]. You have [uses] light\s remaining.</span>"
|
||||
to_chat(user, "<span class='notice'>You insert a piece of glass into the [src.name]. You have [uses] light\s remaining.</span>")
|
||||
return
|
||||
else
|
||||
user << "<span class='warning'>You need one sheet of glass to replace lights!</span>"
|
||||
to_chat(user, "<span class='warning'>You need one sheet of glass to replace lights!</span>")
|
||||
|
||||
if(istype(W, /obj/item/weapon/shard))
|
||||
if(uses >= max_uses)
|
||||
user << "<span class='warning'>[src.name] is full.</span>"
|
||||
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
|
||||
return
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
AddUses(round(increment*0.75))
|
||||
user << "<span class='notice'>You insert a shard of glass into the [src.name]. You have [uses] light\s remaining.</span>"
|
||||
to_chat(user, "<span class='notice'>You insert a shard of glass into the [src.name]. You have [uses] light\s remaining.</span>")
|
||||
qdel(W)
|
||||
return
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
else
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
user << "<span class='notice'>You insert the [L.name] into the [src.name]</span>"
|
||||
to_chat(user, "<span class='notice'>You insert the [L.name] into the [src.name]</span>")
|
||||
AddShards(1, user)
|
||||
qdel(L)
|
||||
return
|
||||
@@ -138,21 +138,21 @@
|
||||
qdel(L)
|
||||
|
||||
if(!found_lightbulbs)
|
||||
user << "<span class='warning'>\The [S] contains no bulbs.</span>"
|
||||
to_chat(user, "<span class='warning'>\The [S] contains no bulbs.</span>")
|
||||
return
|
||||
|
||||
if(!replaced_something && src.uses == max_uses)
|
||||
user << "<span class='warning'>\The [src] is full!</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] is full!</span>")
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You fill \the [src] with lights from \the [S]. " + status_string() + "</span>"
|
||||
to_chat(user, "<span class='notice'>You fill \the [src] with lights from \the [S]. " + status_string() + "</span>")
|
||||
|
||||
/obj/item/device/lightreplacer/emag_act()
|
||||
if(!emagged)
|
||||
Emag()
|
||||
|
||||
/obj/item/device/lightreplacer/attack_self(mob/user)
|
||||
user << status_string()
|
||||
to_chat(user, status_string())
|
||||
|
||||
/obj/item/device/lightreplacer/update_icon()
|
||||
icon_state = "lightreplacer[emagged]"
|
||||
@@ -176,7 +176,7 @@
|
||||
AddUses(new_bulbs)
|
||||
bulb_shards = bulb_shards % shards_required
|
||||
if(new_bulbs != 0)
|
||||
user << "<span class='notice'>\The [src] has fabricated a new bulb from the broken glass it has stored. It now has [uses] uses.</span>"
|
||||
to_chat(user, "<span class='notice'>\The [src] has fabricated a new bulb from the broken glass it has stored. It now has [uses] uses.</span>")
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
return new_bulbs
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
if(target.status != LIGHT_OK)
|
||||
if(CanUse(U))
|
||||
if(!Use(U)) return
|
||||
U << "<span class='notice'>You replace the [target.fitting] with \the [src].</span>"
|
||||
to_chat(U, "<span class='notice'>You replace the [target.fitting] with \the [src].</span>")
|
||||
|
||||
if(target.status != LIGHT_EMPTY)
|
||||
AddShards(1, U)
|
||||
@@ -213,10 +213,10 @@
|
||||
return
|
||||
|
||||
else
|
||||
U << failmsg
|
||||
to_chat(U, failmsg)
|
||||
return
|
||||
else
|
||||
U << "<span class='warning'>There is a working [target.fitting] already inserted!</span>"
|
||||
to_chat(U, "<span class='warning'>There is a working [target.fitting] already inserted!</span>")
|
||||
return
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Emag()
|
||||
@@ -250,7 +250,7 @@
|
||||
ReplaceLight(A, U)
|
||||
|
||||
if(!used)
|
||||
U << failmsg
|
||||
to_chat(U, failmsg)
|
||||
|
||||
/obj/item/device/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
J.put_in_cart(src, user)
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
|
||||
/obj/item/device/megaphone/get_held_item_speechspans(mob/living/carbon/user)
|
||||
if(spamcheck > world.time)
|
||||
user << "<span class='warning'>\The [src] needs to recharge!</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] needs to recharge!</span>")
|
||||
else
|
||||
playsound(loc, 'sound/items/megaphone.ogg', 100, 0, 1)
|
||||
spamcheck = world.time + 50
|
||||
return voicespan
|
||||
|
||||
/obj/item/device/megaphone/emag_act(mob/user)
|
||||
user << "<span class='warning'>You overload \the [src]'s voice synthesizer.</span>"
|
||||
to_chat(user, "<span class='warning'>You overload \the [src]'s voice synthesizer.</span>")
|
||||
emagged = 1
|
||||
voicespan = list(SPAN_REALLYBIG, "userdanger")
|
||||
|
||||
|
||||
@@ -65,25 +65,27 @@
|
||||
SSpai.findPAI(src, usr)
|
||||
|
||||
if(pai)
|
||||
if(!(loc == usr))
|
||||
return
|
||||
if(href_list["setdna"])
|
||||
if(pai.master_dna)
|
||||
return
|
||||
if(!istype(usr, /mob/living/carbon))
|
||||
usr << "<span class='warning'>You don't have any DNA, or your DNA is incompatible with this device!</span>"
|
||||
to_chat(usr, "<span class='warning'>You don't have any DNA, or your DNA is incompatible with this device!</span>")
|
||||
else
|
||||
var/mob/living/carbon/M = usr
|
||||
pai.master = M.real_name
|
||||
pai.master_dna = M.dna.unique_enzymes
|
||||
pai << "<span class='notice'>You have been bound to a new master.</span>"
|
||||
to_chat(pai, "<span class='notice'>You have been bound to a new master.</span>")
|
||||
pai.emittersemicd = FALSE
|
||||
if(href_list["wipe"])
|
||||
var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in list("Yes", "No")
|
||||
if(confirm == "Yes")
|
||||
if(pai)
|
||||
pai << "<span class='warning'>You feel yourself slipping away from reality.</span>"
|
||||
pai << "<span class='danger'>Byte by byte you lose your sense of self.</span>"
|
||||
pai << "<span class='userdanger'>Your mental faculties leave you.</span>"
|
||||
pai << "<span class='rose'>oblivion... </span>"
|
||||
to_chat(pai, "<span class='warning'>You feel yourself slipping away from reality.</span>")
|
||||
to_chat(pai, "<span class='danger'>Byte by byte you lose your sense of self.</span>")
|
||||
to_chat(pai, "<span class='userdanger'>Your mental faculties leave you.</span>")
|
||||
to_chat(pai, "<span class='rose'>oblivion... </span>")
|
||||
pai.death(0)
|
||||
if(href_list["wires"])
|
||||
var/wire = text2num(href_list["wires"])
|
||||
@@ -95,13 +97,13 @@
|
||||
pai.add_supplied_law(0,newlaws)
|
||||
if(href_list["toggle_holo"])
|
||||
if(pai.canholo)
|
||||
pai << "<span class='userdanger'>Your owner has disabled your holomatrix projectors!</span>"
|
||||
to_chat(pai, "<span class='userdanger'>Your owner has disabled your holomatrix projectors!</span>")
|
||||
pai.canholo = FALSE
|
||||
usr << "<span class='warning'>You disable your pAI's holomatrix!</span>"
|
||||
to_chat(usr, "<span class='warning'>You disable your pAI's holomatrix!</span>")
|
||||
else
|
||||
pai << "<span class='boldnotice'>Your owner has enabled your holomatrix projectors!</span>"
|
||||
to_chat(pai, "<span class='boldnotice'>Your owner has enabled your holomatrix projectors!</span>")
|
||||
pai.canholo = TRUE
|
||||
usr << "<span class='notice'>You enable your pAI's holomatrix!</span>"
|
||||
to_chat(usr, "<span class='notice'>You enable your pAI's holomatrix!</span>")
|
||||
|
||||
attack_self(usr)
|
||||
|
||||
|
||||
@@ -37,4 +37,4 @@
|
||||
|
||||
/obj/item/device/pipe_painter/examine()
|
||||
..()
|
||||
usr << "It is set to [mode]."
|
||||
to_chat(usr, "It is set to [mode].")
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
mode = value
|
||||
update_icon()
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
|
||||
/obj/item/device/powersink/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
@@ -61,7 +61,7 @@
|
||||
if(isturf(T) && !T.intact)
|
||||
attached = locate() in T
|
||||
if(!attached)
|
||||
user << "<span class='warning'>This device must be placed over an exposed, powered cable node!</span>"
|
||||
to_chat(user, "<span class='warning'>This device must be placed over an exposed, powered cable node!</span>")
|
||||
else
|
||||
set_mode(CLAMPED_OFF)
|
||||
user.visible_message( \
|
||||
@@ -69,7 +69,7 @@
|
||||
"<span class='notice'>You attach \the [src] to the cable.</span>",
|
||||
"<span class='italics'>You hear some wires being connected to something.</span>")
|
||||
else
|
||||
user << "<span class='warning'>This device must be placed over an exposed, powered cable node!</span>"
|
||||
to_chat(user, "<span class='warning'>This device must be placed over an exposed, powered cable node!</span>")
|
||||
else
|
||||
set_mode(DISCONNECTED)
|
||||
user.visible_message( \
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
var/datum/powernet/PN = attached.powernet
|
||||
if(PN)
|
||||
SetLuminosity(5)
|
||||
set_light(5)
|
||||
|
||||
// found a powernet, so drain up to max power from it
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
|
||||
/obj/item/device/pressure_plate
|
||||
name = "pressure plate"
|
||||
desc = "Useful for autismforts"
|
||||
item_state = "flash"
|
||||
icon_state = "pressureplate"
|
||||
level = 1
|
||||
var/trigger_mob = TRUE
|
||||
var/trigger_item = FALSE
|
||||
var/trigger_silent = FALSE
|
||||
var/sound/trigger_sound = 'sound/effects/pressureplate.ogg'
|
||||
var/obj/item/device/assembly/signaler/sigdev = null
|
||||
var/roundstart_signaller = FALSE
|
||||
var/roundstart_signaller_freq = 1447
|
||||
var/roundstart_signaller_code = 30
|
||||
var/roundstart_hide = FALSE
|
||||
var/removable_signaller = TRUE
|
||||
var/active = FALSE
|
||||
var/image/tile_overlay = null
|
||||
var/crossed = FALSE
|
||||
var/trigger_delay = 10
|
||||
|
||||
/obj/item/device/pressure_plate/Initialize()
|
||||
..()
|
||||
tile_overlay = image(icon = 'icons/turf/floors.dmi', icon_state = "pp_overlay")
|
||||
if(roundstart_signaller)
|
||||
sigdev = new
|
||||
sigdev.code = roundstart_signaller_code
|
||||
sigdev.frequency = roundstart_signaller_freq
|
||||
if(istype(loc, /turf/open))
|
||||
hide(TRUE)
|
||||
|
||||
/obj/item/device/pressure_plate/Crossed(atom/movable/AM)
|
||||
if(!active)
|
||||
return
|
||||
if(isliving(AM) && trigger_mob)
|
||||
var/mob/living/L = AM
|
||||
step_living(L)
|
||||
crossed = TRUE
|
||||
else if(trigger_item)
|
||||
step_item(AM)
|
||||
crossed = TRUE
|
||||
if(!trigger_silent)
|
||||
if(isturf(loc))
|
||||
loc.visible_message("<span class='danger'>Click!</span>")
|
||||
playsound(loc, trigger_sound, 50, 1)
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/pressure_plate/Uncrossed(atom/movable/AM)
|
||||
if(crossed)
|
||||
playsound(loc, trigger_sound, 50, 1)
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
to_chat(L, "<span class='warning'>You feel something click back into place as you step off [loc]!</span>")
|
||||
addtimer(CALLBACK(src, .proc/trigger), trigger_delay)
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/pressure_plate/proc/trigger()
|
||||
if(istype(sigdev))
|
||||
sigdev.signal()
|
||||
|
||||
/obj/item/device/pressure_plate/proc/step_living(mob/living/L)
|
||||
to_chat(L, "<span class='warning'>You feel a click under your feet!</span>")
|
||||
|
||||
/obj/item/device/pressure_plate/proc/step_item(atom/movable/AM)
|
||||
return
|
||||
|
||||
/obj/item/device/pressure_plate/attackby(obj/item/I, mob/living/L)
|
||||
if(istype(I, /obj/item/device/assembly/signaler) && !istype(sigdev) && removable_signaller && L.transferItemToLoc(I, src))
|
||||
sigdev = I
|
||||
to_chat(L, "<span class='notice'>You attach [I] to [src]!</span>")
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/pressure_plate/attack_self(mob/living/L)
|
||||
if(removable_signaller && istype(sigdev))
|
||||
to_chat(L, "<span class='notice'>You remove [sigdev] from [src]</span>")
|
||||
if(!L.put_in_hands(sigdev))
|
||||
sigdev.forceMove(get_turf(src))
|
||||
sigdev = null
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/pressure_plate/hide(yes)
|
||||
if(yes)
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
anchored = TRUE
|
||||
icon_state = null
|
||||
active = TRUE
|
||||
if(tile_overlay)
|
||||
loc.overlays += tile_overlay
|
||||
else
|
||||
if(crossed)
|
||||
trigger() //no cheesing.
|
||||
invisibility = initial(invisibility)
|
||||
anchored = FALSE
|
||||
icon_state = initial(icon_state)
|
||||
active = FALSE
|
||||
if(tile_overlay)
|
||||
loc.overlays -= tile_overlay
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if(src == C.back)
|
||||
user << "<span class='warning'>You need help taking this off!</span>"
|
||||
to_chat(user, "<span class='warning'>You need help taking this off!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
A.icon = 'icons/obj/assemblies.dmi'
|
||||
|
||||
if(!user.transferItemToLoc(W, A))
|
||||
user << "<span class='warning'>[W] is stuck to your hand, you cannot attach it to [src]!</span>"
|
||||
to_chat(user, "<span class='warning'>[W] is stuck to your hand, you cannot attach it to [src]!</span>")
|
||||
return
|
||||
W.master = A
|
||||
A.part1 = W
|
||||
@@ -109,7 +109,7 @@
|
||||
var/mob/M = loc
|
||||
step(M, pick(cardinal))
|
||||
|
||||
M << "<span class='danger'>You feel a sharp shock!</span>"
|
||||
to_chat(M, "<span class='danger'>You feel a sharp shock!</span>")
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, M)
|
||||
s.start()
|
||||
|
||||
@@ -42,11 +42,14 @@
|
||||
/obj/item/device/radio/headset/syndicate/alt //undisguised bowman with flash protection
|
||||
name = "syndicate headset"
|
||||
desc = "A syndicate headset that can be used to hear all radio frequencies. Protects ears from flashbangs. \nTo access the syndicate channel, use ; before speaking."
|
||||
flags = EARBANGPROTECT
|
||||
origin_tech = "syndicate=3"
|
||||
icon_state = "syndie_headset"
|
||||
item_state = "syndie_headset"
|
||||
|
||||
/obj/item/device/radio/headset/syndicate/alt/Initialize(mapload)
|
||||
..()
|
||||
SET_SECONDARY_FLAG(src, BANG_PROTECT)
|
||||
|
||||
/obj/item/device/radio/headset/syndicate/alt/leader
|
||||
name = "team leader headset"
|
||||
command = TRUE
|
||||
@@ -72,10 +75,13 @@
|
||||
/obj/item/device/radio/headset/headset_sec/alt
|
||||
name = "security bowman headset"
|
||||
desc = "This is used by your elite security force. Protects ears from flashbangs. \nTo access the security channel, use :s."
|
||||
flags = EARBANGPROTECT
|
||||
icon_state = "sec_headset_alt"
|
||||
item_state = "sec_headset_alt"
|
||||
|
||||
/obj/item/device/radio/headset/headset_sec/alt/Initialize(mapload)
|
||||
..()
|
||||
SET_SECONDARY_FLAG(src, BANG_PROTECT)
|
||||
|
||||
/obj/item/device/radio/headset/headset_eng
|
||||
name = "engineering radio headset"
|
||||
desc = "When the engineers wish to chat like girls. \nTo access the engineering channel, use :e. "
|
||||
@@ -124,10 +130,13 @@
|
||||
/obj/item/device/radio/headset/heads/captain/alt
|
||||
name = "\proper the captain's bowman headset"
|
||||
desc = "The headset of the boss. Protects ears from flashbangs. \nChannels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science."
|
||||
flags = EARBANGPROTECT
|
||||
icon_state = "com_headset_alt"
|
||||
item_state = "com_headset_alt"
|
||||
|
||||
/obj/item/device/radio/headset/heads/captain/alt/Initialize(mapload)
|
||||
..()
|
||||
SET_SECONDARY_FLAG(src, BANG_PROTECT)
|
||||
|
||||
/obj/item/device/radio/headset/heads/rd
|
||||
name = "\proper the research director's headset"
|
||||
desc = "Headset of the fellow who keeps society marching towards technological singularity. \nTo access the science channel, use :n. For command, use :c."
|
||||
@@ -143,10 +152,13 @@
|
||||
/obj/item/device/radio/headset/heads/hos/alt
|
||||
name = "\proper the head of security's bowman headset"
|
||||
desc = "The headset of the man in charge of keeping order and protecting the station. Protects ears from flashbangs. \nTo access the security channel, use :s. For command, use :c."
|
||||
flags = EARBANGPROTECT
|
||||
icon_state = "com_headset_alt"
|
||||
item_state = "com_headset_alt"
|
||||
|
||||
/obj/item/device/radio/headset/heads/hos/alt/Initialize(mapload)
|
||||
..()
|
||||
SET_SECONDARY_FLAG(src, BANG_PROTECT)
|
||||
|
||||
/obj/item/device/radio/headset/heads/ce
|
||||
name = "\proper the chief engineer's headset"
|
||||
desc = "The headset of the guy in charge of keeping the station powered and undamaged. \nTo access the engineering channel, use :e. For command, use :c."
|
||||
@@ -196,11 +208,14 @@
|
||||
/obj/item/device/radio/headset/headset_cent/alt
|
||||
name = "\improper Centcom bowman headset"
|
||||
desc = "A headset especially for emergency response personnel. Protects ears from flashbangs. \nTo access the centcom channel, use :y."
|
||||
flags = EARBANGPROTECT
|
||||
icon_state = "cent_headset_alt"
|
||||
item_state = "cent_headset_alt"
|
||||
keyslot = null
|
||||
|
||||
/obj/item/device/radio/headset/headset_cent/alt/Initialize(mapload)
|
||||
..()
|
||||
SET_SECONDARY_FLAG(src, BANG_PROTECT)
|
||||
|
||||
/obj/item/device/radio/headset/ai
|
||||
name = "\proper Integrated Subspace Transceiver "
|
||||
keyslot2 = new /obj/item/device/encryptionkey/ai
|
||||
@@ -235,14 +250,14 @@
|
||||
keyslot2 = null
|
||||
|
||||
recalculateChannels()
|
||||
user << "<span class='notice'>You pop out the encryption keys in the headset.</span>"
|
||||
to_chat(user, "<span class='notice'>You pop out the encryption keys in the headset.</span>")
|
||||
|
||||
else
|
||||
user << "<span class='warning'>This headset doesn't have any unique encryption keys! How useless...</span>"
|
||||
to_chat(user, "<span class='warning'>This headset doesn't have any unique encryption keys! How useless...</span>")
|
||||
|
||||
else if(istype(W, /obj/item/device/encryptionkey/))
|
||||
if(keyslot && keyslot2)
|
||||
user << "<span class='warning'>The headset can't hold another key!</span>"
|
||||
to_chat(user, "<span class='warning'>The headset can't hold another key!</span>")
|
||||
return
|
||||
|
||||
if(!keyslot)
|
||||
|
||||
@@ -238,6 +238,12 @@
|
||||
var/freqnum = text2num(freq) //Why should we call text2num three times when we can just do it here?
|
||||
var/turf/position = get_turf(src)
|
||||
|
||||
var/jammed = FALSE
|
||||
for(var/obj/item/device/jammer/jammer in active_jammers)
|
||||
if(get_dist(position,get_turf(jammer)) < jammer.range)
|
||||
jammed = TRUE
|
||||
break
|
||||
|
||||
//#### Tagging the signal with all appropriate identity values ####//
|
||||
|
||||
// ||-- The mob's name identity --||
|
||||
@@ -254,6 +260,8 @@
|
||||
|
||||
var/jobname // the mob's "job"
|
||||
|
||||
if(jammed)
|
||||
message = Gibberish(message,100)
|
||||
|
||||
// --- Human: use their job as seen on the crew manifest - makes it unneeded to carry an ID for an AI to see their job
|
||||
if(ishuman(M))
|
||||
@@ -499,18 +507,18 @@
|
||||
/obj/item/device/radio/examine(mob/user)
|
||||
..()
|
||||
if (b_stat)
|
||||
user << "<span class='notice'>[name] can be attached and modified.</span>"
|
||||
to_chat(user, "<span class='notice'>[name] can be attached and modified.</span>")
|
||||
else
|
||||
user << "<span class='notice'>[name] can not be modified or attached.</span>"
|
||||
to_chat(user, "<span class='notice'>[name] can not be modified or attached.</span>")
|
||||
|
||||
/obj/item/device/radio/attackby(obj/item/weapon/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
b_stat = !b_stat
|
||||
if(b_stat)
|
||||
user << "<span class='notice'>The radio can now be attached and modified!</span>"
|
||||
to_chat(user, "<span class='notice'>The radio can now be attached and modified!</span>")
|
||||
else
|
||||
user << "<span class='notice'>The radio can no longer be modified or attached!</span>"
|
||||
to_chat(user, "<span class='notice'>The radio can no longer be modified or attached!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -518,7 +526,7 @@
|
||||
emped++ //There's been an EMP; better count it
|
||||
var/curremp = emped //Remember which EMP this was
|
||||
if (listening && ismob(loc)) // if the radio is turned on and on someone's person they notice
|
||||
loc << "<span class='warning'>\The [src] overloads.</span>"
|
||||
to_chat(loc, "<span class='warning'>\The [src] overloads.</span>")
|
||||
broadcasting = 0
|
||||
listening = 0
|
||||
for (var/ch_name in channels)
|
||||
@@ -541,6 +549,10 @@
|
||||
subspace_switchable = 1
|
||||
dog_fashion = null
|
||||
|
||||
/obj/item/device/radio/borg/Initialize(mapload)
|
||||
..()
|
||||
SET_SECONDARY_FLAG(src, NO_EMP_WIRES)
|
||||
|
||||
/obj/item/device/radio/borg/syndicate
|
||||
syndie = 1
|
||||
keyslot = new /obj/item/device/encryptionkey/syndicate
|
||||
@@ -565,14 +577,14 @@
|
||||
keyslot = null
|
||||
|
||||
recalculateChannels()
|
||||
user << "<span class='notice'>You pop out the encryption key in the radio.</span>"
|
||||
to_chat(user, "<span class='notice'>You pop out the encryption key in the radio.</span>")
|
||||
|
||||
else
|
||||
user << "<span class='warning'>This radio doesn't have any encryption keys!</span>"
|
||||
to_chat(user, "<span class='warning'>This radio doesn't have any encryption keys!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/device/encryptionkey/))
|
||||
if(keyslot)
|
||||
user << "<span class='warning'>The radio can't hold another key!</span>"
|
||||
to_chat(user, "<span class='warning'>The radio can't hold another key!</span>")
|
||||
return
|
||||
|
||||
if(!keyslot)
|
||||
|
||||
@@ -80,22 +80,22 @@ MASS SPECTROMETER
|
||||
|
||||
/obj/item/device/healthanalyzer/attack_self(mob/user)
|
||||
if(!scanmode)
|
||||
user << "<span class='notice'>You switch the health analyzer to scan chemical contents.</span>"
|
||||
to_chat(user, "<span class='notice'>You switch the health analyzer to scan chemical contents.</span>")
|
||||
scanmode = 1
|
||||
else
|
||||
user << "<span class='notice'>You switch the health analyzer to check physical health.</span>"
|
||||
to_chat(user, "<span class='notice'>You switch the health analyzer to check physical health.</span>")
|
||||
scanmode = 0
|
||||
|
||||
/obj/item/device/healthanalyzer/attack(mob/living/M, mob/living/carbon/human/user)
|
||||
|
||||
// Clumsiness/brain damage check
|
||||
if ((user.disabilities & CLUMSY || user.getBrainLoss() >= 60) && prob(50))
|
||||
user << "<span class='notice'>You stupidly try to analyze the floor's vitals!</span>"
|
||||
to_chat(user, "<span class='notice'>You stupidly try to analyze the floor's vitals!</span>")
|
||||
user.visible_message("<span class='warning'>[user] has analyzed the floor's vitals!</span>")
|
||||
user << "<span class='info'>Analyzing results for The floor:\n\tOverall status: <b>Healthy</b>"
|
||||
user << "<span class='info'>Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FF8000'>Burn</font>/<font color='red'>Brute</font></span>"
|
||||
user << "<span class='info'>\tDamage specifics: <font color='blue'>0</font>-<font color='green'>0</font>-<font color='#FF8000'>0</font>-<font color='red'>0</font></span>"
|
||||
user << "<span class='info'>Body temperature: ???</span>"
|
||||
to_chat(user, "<span class='info'>Analyzing results for The floor:\n\tOverall status: <b>Healthy</b>")
|
||||
to_chat(user, "<span class='info'>Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FF8000'>Burn</font>/<font color='red'>Brute</font></span>")
|
||||
to_chat(user, "<span class='info'>\tDamage specifics: <font color='blue'>0</font>-<font color='green'>0</font>-<font color='#FF8000'>0</font>-<font color='red'>0</font></span>")
|
||||
to_chat(user, "<span class='info'>Body temperature: ???</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] has analyzed [M]'s vitals.</span>")
|
||||
@@ -126,63 +126,62 @@ MASS SPECTROMETER
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.undergoing_cardiac_arrest() && H.stat != DEAD)
|
||||
user << "<span class='danger'>Subject suffering from heart attack: Apply defibrillator immediately!</span>"
|
||||
to_chat(user, "<span class='danger'>Subject suffering from heart attack: Apply defibrillator immediately!</span>")
|
||||
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(C.has_brain_worms())
|
||||
user << "<span class='danger'>Foreign organism detected in subject's cranium. Recommended treatment: Dosage of sucrose solution and removal of object via surgery.</span>"
|
||||
to_chat(user, "<span class='danger'>Foreign organism detected in subject's cranium. Recommended treatment: Dosage of sucrose solution and removal of object via surgery.</span>")
|
||||
|
||||
user << "<span class='info'>Analyzing results for [M]:\n\tOverall status: [mob_status]</span>"
|
||||
to_chat(user, "<span class='info'>Analyzing results for [M]:\n\tOverall status: [mob_status]</span>")
|
||||
|
||||
// Damage descriptions
|
||||
if(brute_loss > 10)
|
||||
user << "\t<span class='alert'>[brute_loss > 50 ? "Severe" : "Minor"] tissue damage detected.</span>"
|
||||
to_chat(user, "\t<span class='alert'>[brute_loss > 50 ? "Severe" : "Minor"] tissue damage detected.</span>")
|
||||
if(fire_loss > 10)
|
||||
user << "\t<span class='alert'>[fire_loss > 50 ? "Severe" : "Minor"] burn damage detected.</span>"
|
||||
to_chat(user, "\t<span class='alert'>[fire_loss > 50 ? "Severe" : "Minor"] burn damage detected.</span>")
|
||||
if(oxy_loss > 10)
|
||||
user << "\t<span class='info'><span class='alert'>[oxy_loss > 50 ? "Severe" : "Minor"] oxygen deprivation detected.</span>"
|
||||
to_chat(user, "\t<span class='info'><span class='alert'>[oxy_loss > 50 ? "Severe" : "Minor"] oxygen deprivation detected.</span>")
|
||||
if(tox_loss > 10)
|
||||
user << "\t<span class='alert'>[tox_loss > 50 ? "Critical" : "Dangerous"] amount of toxins detected.</span>"
|
||||
to_chat(user, "\t<span class='alert'>[tox_loss > 50 ? "Critical" : "Dangerous"] amount of toxins detected.</span>")
|
||||
if(M.getStaminaLoss())
|
||||
user << "\t<span class='alert'>Subject appears to be suffering from fatigue.</span>"
|
||||
to_chat(user, "\t<span class='alert'>Subject appears to be suffering from fatigue.</span>")
|
||||
if (M.getCloneLoss())
|
||||
user << "\t<span class='alert'>Subject appears to have [M.getCloneLoss() > 30 ? "severe" : "minor"] cellular damage.</span>"
|
||||
to_chat(user, "\t<span class='alert'>Subject appears to have [M.getCloneLoss() > 30 ? "severe" : "minor"] cellular damage.</span>")
|
||||
if (M.reagents && M.reagents.get_reagent_amount("epinephrine"))
|
||||
user << "\t<span class='info'>Bloodstream analysis located [M.reagents:get_reagent_amount("epinephrine")] units of rejuvenation chemicals.</span>"
|
||||
to_chat(user, "\t<span class='info'>Bloodstream analysis located [M.reagents:get_reagent_amount("epinephrine")] units of rejuvenation chemicals.</span>")
|
||||
if (M.getBrainLoss() >= 100 || !M.getorgan(/obj/item/organ/brain))
|
||||
user << "\t<span class='alert'>Subject brain function is non-existent.</span>"
|
||||
to_chat(user, "\t<span class='alert'>Subject brain function is non-existent.</span>")
|
||||
else if (M.getBrainLoss() >= 60)
|
||||
user << "\t<span class='alert'>Severe brain damage detected. Subject likely to have mental retardation.</span>"
|
||||
to_chat(user, "\t<span class='alert'>Severe brain damage detected. Subject likely to have mental retardation.</span>")
|
||||
else if (M.getBrainLoss() >= 10)
|
||||
user << "\t<span class='alert'>Brain damage detected. Subject may have had a concussion.</span>"
|
||||
to_chat(user, "\t<span class='alert'>Brain damage detected. Subject may have had a concussion.</span>")
|
||||
|
||||
// Organ damage report
|
||||
if(iscarbon(M) && mode == 1)
|
||||
var/mob/living/carbon/C = M
|
||||
var/list/damaged = C.get_damaged_bodyparts(1,1)
|
||||
if(length(damaged)>0 || oxy_loss>0 || tox_loss>0 || fire_loss>0)
|
||||
user << "<span class='info'>\tDamage: <span class='info'><font color='red'>Brute</font></span>-<font color='#FF8000'>Burn</font>-<font color='green'>Toxin</font>-<font color='blue'>Suffocation</font>\n\t\tSpecifics: <font color='red'>[brute_loss]</font>-<font color='#FF8000'>[fire_loss]</font>-<font color='green'>[tox_loss]</font>-<font color='blue'>[oxy_loss]</font></span>"
|
||||
to_chat(user, "<span class='info'>\tDamage: <span class='info'><font color='red'>Brute</font></span>-<font color='#FF8000'>Burn</font>-<font color='green'>Toxin</font>-<font color='blue'>Suffocation</font>\n\t\tSpecifics: <font color='red'>[brute_loss]</font>-<font color='#FF8000'>[fire_loss]</font>-<font color='green'>[tox_loss]</font>-<font color='blue'>[oxy_loss]</font></span>")
|
||||
for(var/obj/item/bodypart/org in damaged)
|
||||
user << "\t\t<span class='info'>[capitalize(org.name)]: [(org.brute_dam > 0) ? "<font color='red'>[org.brute_dam]</font></span>" : "<font color='red'>0</font>"]-[(org.burn_dam > 0) ? "<font color='#FF8000'>[org.burn_dam]</font>" : "<font color='#FF8000'>0</font>"]"
|
||||
to_chat(user, "\t\t<span class='info'>[capitalize(org.name)]: [(org.brute_dam > 0) ? "<font color='red'>[org.brute_dam]</font></span>" : "<font color='red'>0</font>"]-[(org.burn_dam > 0) ? "<font color='#FF8000'>[org.burn_dam]</font>" : "<font color='#FF8000'>0</font>"]")
|
||||
|
||||
// Species and body temperature
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
user << "<span class='info'>Species: [H.dna.species.name]</span>"
|
||||
user << "<span class='info'>Body temperature: [round(M.bodytemperature-T0C,0.1)] °C ([round(M.bodytemperature*1.8-459.67,0.1)] °F)</span>"
|
||||
to_chat(user, "<span class='info'>Species: [H.dna.species.name]</span>")
|
||||
to_chat(user, "<span class='info'>Body temperature: [round(M.bodytemperature-T0C,0.1)] °C ([round(M.bodytemperature*1.8-459.67,0.1)] °F)</span>")
|
||||
|
||||
// Time of death
|
||||
if(M.tod && (M.stat == DEAD || (M.status_flags & FAKEDEATH)))
|
||||
user << "<span class='info'>Time of Death:</span> [M.tod]"
|
||||
to_chat(user, "<span class='info'>Time of Death:</span> [M.tod]")
|
||||
var/tdelta = round(world.time - M.timeofdeath)
|
||||
if(tdelta < (DEFIB_TIME_LIMIT * 10))
|
||||
user << "<span class='danger'>Subject died [tdelta / 10] seconds \
|
||||
ago, defibrillation may be possible!</span>"
|
||||
to_chat(user, "<span class='danger'>Subject died [tdelta / 10] seconds ago, defibrillation may be possible!</span>")
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(!(D.visibility_flags & HIDDEN_SCANNER))
|
||||
user << "<span class='alert'><b>Warning: [D.form] detected</b>\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]</span>"
|
||||
to_chat(user, "<span class='alert'><b>Warning: [D.form] detected</b>\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]</span>")
|
||||
|
||||
// Blood Level
|
||||
if(M.has_dna())
|
||||
@@ -192,7 +191,7 @@ MASS SPECTROMETER
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(H.bleed_rate)
|
||||
user << "<span class='danger'>Subject is bleeding!</span>"
|
||||
to_chat(user, "<span class='danger'>Subject is bleeding!</span>")
|
||||
var/blood_percent = round((C.blood_volume / BLOOD_VOLUME_NORMAL)*100)
|
||||
var/blood_type = C.dna.blood_type
|
||||
if(blood_id != "blood")//special blood substance
|
||||
@@ -202,36 +201,36 @@ MASS SPECTROMETER
|
||||
else
|
||||
blood_type = blood_id
|
||||
if(C.blood_volume <= BLOOD_VOLUME_SAFE && C.blood_volume > BLOOD_VOLUME_OKAY)
|
||||
user << "<span class='danger'>LOW blood level [blood_percent] %, [C.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>"
|
||||
to_chat(user, "<span class='danger'>LOW blood level [blood_percent] %, [C.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>")
|
||||
else if(C.blood_volume <= BLOOD_VOLUME_OKAY)
|
||||
user << "<span class='danger'>CRITICAL blood level [blood_percent] %, [C.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>"
|
||||
to_chat(user, "<span class='danger'>CRITICAL blood level [blood_percent] %, [C.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>")
|
||||
else
|
||||
user << "<span class='info'>Blood level [blood_percent] %, [C.blood_volume] cl, type: [blood_type]</span>"
|
||||
to_chat(user, "<span class='info'>Blood level [blood_percent] %, [C.blood_volume] cl, type: [blood_type]</span>")
|
||||
|
||||
var/cyberimp_detect
|
||||
for(var/obj/item/organ/cyberimp/CI in C.internal_organs)
|
||||
if(CI.status == ORGAN_ROBOTIC)
|
||||
cyberimp_detect += "[C.name] is modified with a [CI.name].<br>"
|
||||
if(cyberimp_detect)
|
||||
user << "<span class='notice'>Detected cybernetic modifications:</span>"
|
||||
user << "<span class='notice'>[cyberimp_detect]</span>"
|
||||
to_chat(user, "<span class='notice'>Detected cybernetic modifications:</span>")
|
||||
to_chat(user, "<span class='notice'>[cyberimp_detect]</span>")
|
||||
|
||||
/proc/chemscan(mob/living/user, mob/living/M)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.reagents)
|
||||
if(H.reagents.reagent_list.len)
|
||||
user << "<span class='notice'>Subject contains the following reagents:</span>"
|
||||
to_chat(user, "<span class='notice'>Subject contains the following reagents:</span>")
|
||||
for(var/datum/reagent/R in H.reagents.reagent_list)
|
||||
user << "<span class='notice'>[R.volume] units of [R.name][R.overdosed == 1 ? "</span> - <span class='boldannounce'>OVERDOSING</span>" : ".</span>"]"
|
||||
to_chat(user, "<span class='notice'>[R.volume] units of [R.name][R.overdosed == 1 ? "</span> - <span class='boldannounce'>OVERDOSING</span>" : ".</span>"]")
|
||||
else
|
||||
user << "<span class='notice'>Subject contains no reagents.</span>"
|
||||
to_chat(user, "<span class='notice'>Subject contains no reagents.</span>")
|
||||
if(H.reagents.addiction_list.len)
|
||||
user << "<span class='boldannounce'>Subject is addicted to the following reagents:</span>"
|
||||
to_chat(user, "<span class='boldannounce'>Subject is addicted to the following reagents:</span>")
|
||||
for(var/datum/reagent/R in H.reagents.addiction_list)
|
||||
user << "<span class='danger'>[R.name]</span>"
|
||||
to_chat(user, "<span class='danger'>[R.name]</span>")
|
||||
else
|
||||
user << "<span class='notice'>Subject is not addicted to any reagents.</span>"
|
||||
to_chat(user, "<span class='notice'>Subject is not addicted to any reagents.</span>")
|
||||
|
||||
/obj/item/device/healthanalyzer/verb/toggle_mode()
|
||||
set name = "Switch Verbosity"
|
||||
@@ -243,9 +242,9 @@ MASS SPECTROMETER
|
||||
mode = !mode
|
||||
switch (mode)
|
||||
if(1)
|
||||
usr << "The scanner now shows specific limb damage."
|
||||
to_chat(usr, "The scanner now shows specific limb damage.")
|
||||
if(0)
|
||||
usr << "The scanner no longer shows limb damage."
|
||||
to_chat(usr, "The scanner no longer shows limb damage.")
|
||||
|
||||
|
||||
/obj/item/device/analyzer
|
||||
@@ -278,11 +277,11 @@ MASS SPECTROMETER
|
||||
var/pressure = environment.return_pressure()
|
||||
var/total_moles = environment.total_moles()
|
||||
|
||||
user << "<span class='info'><B>Results:</B></span>"
|
||||
to_chat(user, "<span class='info'><B>Results:</B></span>")
|
||||
if(abs(pressure - ONE_ATMOSPHERE) < 10)
|
||||
user << "<span class='info'>Pressure: [round(pressure,0.1)] kPa</span>"
|
||||
to_chat(user, "<span class='info'>Pressure: [round(pressure,0.1)] kPa</span>")
|
||||
else
|
||||
user << "<span class='alert'>Pressure: [round(pressure,0.1)] kPa</span>"
|
||||
to_chat(user, "<span class='alert'>Pressure: [round(pressure,0.1)] kPa</span>")
|
||||
if(total_moles)
|
||||
var/list/env_gases = environment.gases
|
||||
|
||||
@@ -294,32 +293,32 @@ MASS SPECTROMETER
|
||||
environment.garbage_collect()
|
||||
|
||||
if(abs(n2_concentration - N2STANDARD) < 20)
|
||||
user << "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] %</span>"
|
||||
to_chat(user, "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] %</span>")
|
||||
else
|
||||
user << "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] %</span>"
|
||||
to_chat(user, "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] %</span>")
|
||||
|
||||
if(abs(o2_concentration - O2STANDARD) < 2)
|
||||
user << "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] %</span>"
|
||||
to_chat(user, "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] %</span>")
|
||||
else
|
||||
user << "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] %</span>"
|
||||
to_chat(user, "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] %</span>")
|
||||
|
||||
if(co2_concentration > 0.01)
|
||||
user << "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] %</span>"
|
||||
to_chat(user, "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] %</span>")
|
||||
else
|
||||
user << "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] %</span>"
|
||||
to_chat(user, "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] %</span>")
|
||||
|
||||
if(plasma_concentration > 0.005)
|
||||
user << "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] %</span>"
|
||||
to_chat(user, "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] %</span>")
|
||||
else
|
||||
user << "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] %</span>"
|
||||
to_chat(user, "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] %</span>")
|
||||
|
||||
|
||||
for(var/id in env_gases)
|
||||
if(id in hardcoded_gases)
|
||||
continue
|
||||
var/gas_concentration = env_gases[id][MOLES]/total_moles
|
||||
user << "<span class='alert'>[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] %</span>"
|
||||
user << "<span class='info'>Temperature: [round(environment.temperature-T0C)] °C</span>"
|
||||
to_chat(user, "<span class='alert'>[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] %</span>")
|
||||
to_chat(user, "<span class='info'>Temperature: [round(environment.temperature-T0C)] °C</span>")
|
||||
|
||||
|
||||
/obj/item/device/mass_spectrometer
|
||||
@@ -352,14 +351,14 @@ MASS SPECTROMETER
|
||||
if (user.stat || user.eye_blind)
|
||||
return
|
||||
if (!user.IsAdvancedToolUser())
|
||||
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
if(reagents.total_volume)
|
||||
var/list/blood_traces = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(R.id != "blood")
|
||||
reagents.clear_reagents()
|
||||
user << "<span class='warning'>The sample was contaminated! Please insert another sample.</span>"
|
||||
to_chat(user, "<span class='warning'>The sample was contaminated! Please insert another sample.</span>")
|
||||
return
|
||||
else
|
||||
blood_traces = params2list(R.data["trace_chem"])
|
||||
@@ -373,7 +372,7 @@ MASS SPECTROMETER
|
||||
if(details)
|
||||
dat += " ([blood_traces[R]] units)"
|
||||
dat += "</i>"
|
||||
user << dat
|
||||
to_chat(user, dat)
|
||||
reagents.clear_reagents()
|
||||
|
||||
|
||||
@@ -400,31 +399,31 @@ MASS SPECTROMETER
|
||||
if(user.stat || user.eye_blind)
|
||||
return
|
||||
if (!isslime(M))
|
||||
user << "<span class='warning'>This device can only scan slimes!</span>"
|
||||
to_chat(user, "<span class='warning'>This device can only scan slimes!</span>")
|
||||
return
|
||||
var/mob/living/simple_animal/slime/T = M
|
||||
user << "Slime scan results:"
|
||||
user << "[T.colour] [T.is_adult ? "adult" : "baby"] slime"
|
||||
user << "Nutrition: [T.nutrition]/[T.get_max_nutrition()]"
|
||||
to_chat(user, "Slime scan results:")
|
||||
to_chat(user, "[T.colour] [T.is_adult ? "adult" : "baby"] slime")
|
||||
to_chat(user, "Nutrition: [T.nutrition]/[T.get_max_nutrition()]")
|
||||
if (T.nutrition < T.get_starve_nutrition())
|
||||
user << "<span class='warning'>Warning: slime is starving!</span>"
|
||||
to_chat(user, "<span class='warning'>Warning: slime is starving!</span>")
|
||||
else if (T.nutrition < T.get_hunger_nutrition())
|
||||
user << "<span class='warning'>Warning: slime is hungry</span>"
|
||||
user << "Electric change strength: [T.powerlevel]"
|
||||
user << "Health: [round(T.health/T.maxHealth,0.01)*100]"
|
||||
to_chat(user, "<span class='warning'>Warning: slime is hungry</span>")
|
||||
to_chat(user, "Electric change strength: [T.powerlevel]")
|
||||
to_chat(user, "Health: [round(T.health/T.maxHealth,0.01)*100]")
|
||||
if (T.slime_mutation[4] == T.colour)
|
||||
user << "This slime does not evolve any further."
|
||||
to_chat(user, "This slime does not evolve any further.")
|
||||
else
|
||||
if (T.slime_mutation[3] == T.slime_mutation[4])
|
||||
if (T.slime_mutation[2] == T.slime_mutation[1])
|
||||
user << "Possible mutation: [T.slime_mutation[3]]"
|
||||
user << "Genetic destability: [T.mutation_chance/2] % chance of mutation on splitting"
|
||||
to_chat(user, "Possible mutation: [T.slime_mutation[3]]")
|
||||
to_chat(user, "Genetic destability: [T.mutation_chance/2] % chance of mutation on splitting")
|
||||
else
|
||||
user << "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]] (x2)"
|
||||
user << "Genetic destability: [T.mutation_chance] % chance of mutation on splitting"
|
||||
to_chat(user, "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]] (x2)")
|
||||
to_chat(user, "Genetic destability: [T.mutation_chance] % chance of mutation on splitting")
|
||||
else
|
||||
user << "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]], [T.slime_mutation[4]]"
|
||||
user << "Genetic destability: [T.mutation_chance] % chance of mutation on splitting"
|
||||
to_chat(user, "Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]], [T.slime_mutation[4]]")
|
||||
to_chat(user, "Genetic destability: [T.mutation_chance] % chance of mutation on splitting")
|
||||
if (T.cores > 1)
|
||||
user << "Anomalious slime core amount detected"
|
||||
user << "Growth progress: [T.amount_grown]/[SLIME_EVOLUTION_THRESHOLD]"
|
||||
to_chat(user, "Anomalious slime core amount detected")
|
||||
to_chat(user, "Growth progress: [T.amount_grown]/[SLIME_EVOLUTION_THRESHOLD]")
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/obj/item/device/taperecorder/examine(mob/user)
|
||||
..()
|
||||
user << "The wire panel is [open_panel ? "opened" : "closed"]."
|
||||
to_chat(user, "The wire panel is [open_panel ? "opened" : "closed"].")
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/attackby(obj/item/I, mob/user, params)
|
||||
@@ -35,13 +35,13 @@
|
||||
if(!user.transferItemToLoc(I,src))
|
||||
return
|
||||
mytape = I
|
||||
user << "<span class='notice'>You insert [I] into [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/proc/eject(mob/user)
|
||||
if(mytape)
|
||||
user << "<span class='notice'>You remove [mytape] from [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You remove [mytape] from [src].</span>")
|
||||
stop()
|
||||
user.put_in_hands(mytape)
|
||||
mytape = null
|
||||
@@ -111,7 +111,7 @@
|
||||
return
|
||||
|
||||
if(mytape.used_capacity < mytape.max_capacity)
|
||||
usr << "<span class='notice'>Recording started.</span>"
|
||||
to_chat(usr, "<span class='notice'>Recording started.</span>")
|
||||
recording = 1
|
||||
update_icon()
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
@@ -127,7 +127,7 @@
|
||||
recording = 0
|
||||
update_icon()
|
||||
else
|
||||
usr << "<span class='notice'>The tape is full.</span>"
|
||||
to_chat(usr, "<span class='notice'>The tape is full.</span>")
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/stop()
|
||||
@@ -141,7 +141,7 @@
|
||||
recording = 0
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording stopped."
|
||||
usr << "<span class='notice'>Recording stopped.</span>"
|
||||
to_chat(usr, "<span class='notice'>Recording stopped.</span>")
|
||||
return
|
||||
else if(playing)
|
||||
playing = 0
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
playing = 1
|
||||
update_icon()
|
||||
usr << "<span class='notice'>Playing started.</span>"
|
||||
to_chat(usr, "<span class='notice'>Playing started.</span>")
|
||||
var/used = mytape.used_capacity //to stop runtimes when you eject the tape
|
||||
var/max = mytape.max_capacity
|
||||
for(var/i = 1, used < max, sleep(10 * playsleepseconds))
|
||||
@@ -210,12 +210,12 @@
|
||||
if(!mytape)
|
||||
return
|
||||
if(!canprint)
|
||||
usr << "<span class='notice'>The recorder can't print that fast!</span>"
|
||||
to_chat(usr, "<span class='notice'>The recorder can't print that fast!</span>")
|
||||
return
|
||||
if(recording || playing)
|
||||
return
|
||||
|
||||
usr << "<span class='notice'>Transcript printed.</span>"
|
||||
to_chat(usr, "<span class='notice'>Transcript printed.</span>")
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(get_turf(src))
|
||||
var/t1 = "<B>Transcript:</B><BR><BR>"
|
||||
for(var/i = 1, mytape.storedinfo.len >= i, i++)
|
||||
@@ -254,7 +254,7 @@
|
||||
|
||||
/obj/item/device/tape/attack_self(mob/user)
|
||||
if(!ruined)
|
||||
user << "<span class='notice'>You pull out all the tape!</span>"
|
||||
to_chat(user, "<span class='notice'>You pull out all the tape!</span>")
|
||||
ruin()
|
||||
|
||||
|
||||
@@ -279,9 +279,9 @@
|
||||
else if(istype(I, /obj/item/weapon/pen))
|
||||
delay = 120*1.5
|
||||
if (delay != -1)
|
||||
user << "<span class='notice'>You start winding the tape back in...</span>"
|
||||
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
|
||||
if(do_after(user, delay, target = src))
|
||||
user << "<span class='notice'>You wound the tape back in.</span>"
|
||||
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
|
||||
fix()
|
||||
|
||||
//Random colour tapes
|
||||
|
||||
@@ -34,7 +34,7 @@ effective or pretty fucking useless.
|
||||
/obj/item/device/batterer/attack_self(mob/living/carbon/user, flag = 0, emp = 0)
|
||||
if(!user) return
|
||||
if(times_used >= max_uses)
|
||||
user << "<span class='danger'>The mind batterer has been burnt out!</span>"
|
||||
to_chat(user, "<span class='danger'>The mind batterer has been burnt out!</span>")
|
||||
return
|
||||
|
||||
add_logs(user, null, "knocked down people in the area", src)
|
||||
@@ -45,13 +45,13 @@ effective or pretty fucking useless.
|
||||
M.Weaken(rand(10,20))
|
||||
if(prob(25))
|
||||
M.Stun(rand(5,10))
|
||||
M << "<span class='userdanger'>You feel a tremendous, paralyzing wave flood your mind.</span>"
|
||||
to_chat(M, "<span class='userdanger'>You feel a tremendous, paralyzing wave flood your mind.</span>")
|
||||
|
||||
else
|
||||
M << "<span class='userdanger'>You feel a sudden, electric jolt travel through your head.</span>"
|
||||
to_chat(M, "<span class='userdanger'>You feel a sudden, electric jolt travel through your head.</span>")
|
||||
|
||||
playsound(src.loc, 'sound/misc/interference.ogg', 50, 1)
|
||||
user << "<span class='notice'>You trigger [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You trigger [src].</span>")
|
||||
times_used += 1
|
||||
if(times_used >= max_uses)
|
||||
icon_state = "battererburnt"
|
||||
@@ -86,14 +86,14 @@ effective or pretty fucking useless.
|
||||
used = 1
|
||||
icon_state = "health1"
|
||||
handle_cooldown(cooldown) // splits off to handle the cooldown while handling wavelength
|
||||
user << "<span class='warning'>Successfully irradiated [M].</span>"
|
||||
to_chat(user, "<span class='warning'>Successfully irradiated [M].</span>")
|
||||
spawn((wavelength+(intensity*4))*5)
|
||||
if(M)
|
||||
if(intensity >= 5)
|
||||
M.apply_effect(round(intensity/1.5), PARALYZE)
|
||||
M.rad_act(intensity*10)
|
||||
else
|
||||
user << "<span class='warning'>The radioactive microlaser is still recharging.</span>"
|
||||
to_chat(user, "<span class='warning'>The radioactive microlaser is still recharging.</span>")
|
||||
|
||||
/obj/item/device/healthanalyzer/rad_laser/proc/handle_cooldown(cooldown)
|
||||
spawn(cooldown)
|
||||
@@ -192,14 +192,14 @@ effective or pretty fucking useless.
|
||||
/obj/item/device/shadowcloak/proc/Activate(mob/living/carbon/human/user)
|
||||
if(!user)
|
||||
return
|
||||
user << "<span class='notice'>You activate [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You activate [src].</span>")
|
||||
src.user = user
|
||||
START_PROCESSING(SSobj, src)
|
||||
old_alpha = user.alpha
|
||||
on = 1
|
||||
|
||||
/obj/item/device/shadowcloak/proc/Deactivate()
|
||||
user << "<span class='notice'>You deactivate [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You deactivate [src].</span>")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
if(user)
|
||||
user.alpha = old_alpha
|
||||
@@ -218,8 +218,27 @@ effective or pretty fucking useless.
|
||||
var/turf/T = get_turf(src)
|
||||
if(on)
|
||||
var/lumcount = T.get_lumcount()
|
||||
if(lumcount > 3)
|
||||
if(lumcount > 0.3)
|
||||
charge = max(0,charge - 25)//Quick decrease in light
|
||||
else
|
||||
charge = min(max_charge,charge + 50) //Charge in the dark
|
||||
animate(user,alpha = Clamp(255 - charge,0,255),time = 10)
|
||||
|
||||
|
||||
/obj/item/device/jammer
|
||||
name = "radio jammer"
|
||||
desc = "Device used to disrupt nearby radio communication."
|
||||
icon_state = "jammer"
|
||||
var/active = FALSE
|
||||
var/range = 7
|
||||
|
||||
/obj/item/device/jammer/attack_self(mob/user)
|
||||
to_chat(user,"<span class='notice'>You [active ? "deactivate" : "activate"] the [src]<span>")
|
||||
active = !active
|
||||
if(active)
|
||||
active_jammers |= src
|
||||
else
|
||||
active_jammers -= src
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -18,21 +18,21 @@
|
||||
/obj/item/device/transfer_valve/attackby(obj/item/item, mob/user, params)
|
||||
if(istype(item, /obj/item/weapon/tank))
|
||||
if(tank_one && tank_two)
|
||||
user << "<span class='warning'>There are already two tanks attached, remove one first!</span>"
|
||||
to_chat(user, "<span class='warning'>There are already two tanks attached, remove one first!</span>")
|
||||
return
|
||||
|
||||
if(!tank_one)
|
||||
if(!user.transferItemToLoc(item, src))
|
||||
return
|
||||
tank_one = item
|
||||
user << "<span class='notice'>You attach the tank to the transfer valve.</span>"
|
||||
to_chat(user, "<span class='notice'>You attach the tank to the transfer valve.</span>")
|
||||
if(item.w_class > w_class)
|
||||
w_class = item.w_class
|
||||
else if(!tank_two)
|
||||
if(!user.transferItemToLoc(item, src))
|
||||
return
|
||||
tank_two = item
|
||||
user << "<span class='notice'>You attach the tank to the transfer valve.</span>"
|
||||
to_chat(user, "<span class='notice'>You attach the tank to the transfer valve.</span>")
|
||||
if(item.w_class > w_class)
|
||||
w_class = item.w_class
|
||||
|
||||
@@ -41,15 +41,15 @@
|
||||
else if(isassembly(item))
|
||||
var/obj/item/device/assembly/A = item
|
||||
if(A.secured)
|
||||
user << "<span class='notice'>The device is secured.</span>"
|
||||
to_chat(user, "<span class='notice'>The device is secured.</span>")
|
||||
return
|
||||
if(attached_device)
|
||||
user << "<span class='warning'>There is already a device attached to the valve, remove it first!</span>"
|
||||
to_chat(user, "<span class='warning'>There is already a device attached to the valve, remove it first!</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(item, src))
|
||||
return
|
||||
attached_device = A
|
||||
user << "<span class='notice'>You attach the [item] to the valve controls and secure it.</span>"
|
||||
to_chat(user, "<span class='notice'>You attach the [item] to the valve controls and secure it.</span>")
|
||||
A.holder = src
|
||||
A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb).
|
||||
|
||||
|
||||
@@ -48,11 +48,11 @@
|
||||
/obj/item/documents/photocopy/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/toy/crayon/red) || istype(O, /obj/item/toy/crayon/blue))
|
||||
if (forgedseal)
|
||||
user << "<span class='warning'>You have already forged a seal on [src]!</span>"
|
||||
to_chat(user, "<span class='warning'>You have already forged a seal on [src]!</span>")
|
||||
else
|
||||
var/obj/item/toy/crayon/C = O
|
||||
name = "[C.item_color] secret documents"
|
||||
icon_state = "docs_[C.item_color]"
|
||||
forgedseal = C.item_color
|
||||
user << "<span class='notice'>You forge the official seal with a [C.item_color] crayon. No one will notice... right?</span>"
|
||||
to_chat(user, "<span class='notice'>You forge the official seal with a [C.item_color] crayon. No one will notice... right?</span>")
|
||||
update_icon()
|
||||
@@ -0,0 +1,200 @@
|
||||
/obj/item/toy/eightball
|
||||
name = "magic eightball"
|
||||
desc = "A black ball with a stenciled number eight in white on the side. It seems full of dark liquid.\nThe instructions state that you should ask your question aloud, and then shake."
|
||||
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "eightball"
|
||||
|
||||
verb_say = "rattles"
|
||||
|
||||
var/shaking = FALSE
|
||||
var/on_cooldown = FALSE
|
||||
|
||||
var/shake_time = 150
|
||||
var/cooldown_time = 1800
|
||||
|
||||
var/static/list/possible_answers = list(
|
||||
"It is certain",
|
||||
"It is decidedly so",
|
||||
"Without a doubt",
|
||||
"Yes definitely",
|
||||
"You may rely on it",
|
||||
"As I see it, yes",
|
||||
"Most likely",
|
||||
"Outlook good",
|
||||
"Yes",
|
||||
"Signs point to yes",
|
||||
"Reply hazy try again",
|
||||
"Ask again later",
|
||||
"Better not tell you now",
|
||||
"Cannot predict now",
|
||||
"Concentrate and ask again",
|
||||
"Don't count on it",
|
||||
"My reply is no",
|
||||
"My sources say no",
|
||||
"Outlook not so good",
|
||||
"Very doubtful")
|
||||
|
||||
/obj/item/toy/eightball/Initialize(mapload)
|
||||
..()
|
||||
if(prob(1))
|
||||
new /obj/item/toy/eightball/haunted(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/toy/eightball/attack_self(mob/user)
|
||||
if(shaking)
|
||||
return
|
||||
|
||||
if(on_cooldown)
|
||||
to_chat(user, "<span class='warning'>[src] was shaken recently, it needs time to settle.</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] starts shaking [src].</span>", "<span class='notice'>You start shaking [src].</span>", "<span class='italics'>You hear shaking and sloshing.</span>")
|
||||
|
||||
shaking = TRUE
|
||||
|
||||
start_shaking(user)
|
||||
if(do_after(user, shake_time, needhand=TRUE, target=src, progress=TRUE))
|
||||
var/answer = get_answer()
|
||||
say(answer)
|
||||
|
||||
on_cooldown = TRUE
|
||||
addtimer(CALLBACK(src, .proc/clear_cooldown), cooldown_time)
|
||||
|
||||
shaking = FALSE
|
||||
|
||||
/obj/item/toy/eightball/proc/start_shaking(user)
|
||||
return
|
||||
|
||||
/obj/item/toy/eightball/proc/get_answer()
|
||||
return pick(possible_answers)
|
||||
|
||||
/obj/item/toy/eightball/proc/clear_cooldown()
|
||||
on_cooldown = FALSE
|
||||
|
||||
// A broken magic eightball, it only says "YOU SUCK" over and over again.
|
||||
|
||||
/obj/item/toy/eightball/broken
|
||||
name = "broken magic eightball"
|
||||
desc = "A black ball with a stenciled number eight in white on the side. It is cracked and seems empty."
|
||||
var/fixed_answer
|
||||
|
||||
/obj/item/toy/eightball/broken/Initialize(mapload)
|
||||
..()
|
||||
fixed_answer = pick(possible_answers)
|
||||
|
||||
/obj/item/toy/eightball/broken/get_answer()
|
||||
return fixed_answer
|
||||
|
||||
// Haunted eightball is identical in description and function to toy,
|
||||
// except it actually ASKS THE DEAD (wooooo)
|
||||
|
||||
/obj/item/toy/eightball/haunted
|
||||
flags = HEAR
|
||||
var/last_message
|
||||
var/selected_message
|
||||
var/list/votes
|
||||
|
||||
/obj/item/toy/eightball/haunted/Initialize(mapload)
|
||||
..()
|
||||
votes = list()
|
||||
poi_list |= src
|
||||
|
||||
/obj/item/toy/eightball/haunted/Destroy()
|
||||
poi_list -= src
|
||||
. = ..()
|
||||
|
||||
/obj/item/toy/eightball/haunted/attack_ghost(mob/user)
|
||||
if(!shaking)
|
||||
to_chat(user, "<span class='warning'>[src] is not currently being shaken.</span>")
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/item/toy/eightball/haunted/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, spans)
|
||||
last_message = raw_message
|
||||
|
||||
/obj/item/toy/eightball/haunted/start_shaking(mob/user)
|
||||
// notify ghosts that someone's shaking a haunted eightball
|
||||
// and inform them of the message, (hopefully a yes/no question)
|
||||
selected_message = last_message
|
||||
notify_ghosts("[user] is shaking [src], hoping to get an answer to \"[selected_message]\"", source=src, enter_link="<a href=?src=\ref[src];interact=1>(Click to help)</a>", action=NOTIFY_ATTACK)
|
||||
|
||||
/obj/item/toy/eightball/haunted/Topic(href, href_list)
|
||||
if(href_list["interact"])
|
||||
if(isobserver(usr))
|
||||
interact(usr)
|
||||
|
||||
/obj/item/toy/eightball/haunted/proc/get_vote_tallies()
|
||||
var/list/answers = list()
|
||||
for(var/ckey in votes)
|
||||
var/selected = votes[ckey]
|
||||
if(selected in answers)
|
||||
answers[selected]++
|
||||
else
|
||||
answers[selected] = 1
|
||||
|
||||
return answers
|
||||
|
||||
|
||||
/obj/item/toy/eightball/haunted/get_answer()
|
||||
if(!votes.len)
|
||||
return pick(possible_answers)
|
||||
|
||||
var/list/tallied_votes = get_vote_tallies()
|
||||
|
||||
// I miss python sorting, then I wouldn't have to muck about with
|
||||
// all this
|
||||
var/most_popular_answer
|
||||
var/most_amount = 0
|
||||
// yes, if there is a tie, there is an arbitary decision
|
||||
// but we never said the spirit world was fair
|
||||
for(var/A in tallied_votes)
|
||||
var/amount = tallied_votes[A]
|
||||
if(amount > most_amount)
|
||||
most_popular_answer = A
|
||||
|
||||
return most_popular_answer
|
||||
|
||||
/obj/item/toy/eightball/haunted/ui_interact(mob/user, ui_key="main", datum/tgui/ui=null, force_open=0, datum/tgui/master_ui=null, datum/ui_state/state=observer_state)
|
||||
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "eightball", name, 400, 600, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/toy/eightball/haunted/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["shaking"] = shaking
|
||||
data["question"] = selected_message
|
||||
var/list/tallied_votes = get_vote_tallies()
|
||||
|
||||
data["answers"] = list()
|
||||
|
||||
for(var/pa in possible_answers)
|
||||
var/list/L = list()
|
||||
L["answer"] = pa
|
||||
var/amount = 0
|
||||
if(pa in tallied_votes)
|
||||
amount = tallied_votes[pa]
|
||||
L["amount"] = amount
|
||||
var/selected = FALSE
|
||||
if(votes[user.ckey] == pa)
|
||||
selected = TRUE
|
||||
L["selected"] = selected
|
||||
|
||||
data["answers"] += list(L)
|
||||
return data
|
||||
|
||||
/obj/item/toy/eightball/haunted/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
var/mob/user = usr
|
||||
|
||||
switch(action)
|
||||
if("vote")
|
||||
var/selected_answer = params["answer"]
|
||||
if(!selected_answer in possible_answers)
|
||||
return
|
||||
else
|
||||
votes[user.ckey] = selected_answer
|
||||
. = TRUE
|
||||
@@ -17,7 +17,7 @@
|
||||
icon_state = "latexballon_blow"
|
||||
item_state = "latexballon"
|
||||
user.update_inv_hands()
|
||||
user << "<span class='notice'>You blow up [src] with [tank].</span>"
|
||||
to_chat(user, "<span class='notice'>You blow up [src] with [tank].</span>")
|
||||
air_contents = tank.remove_air_volume(3)
|
||||
|
||||
/obj/item/latexballon/proc/burst()
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
ncore.forceMove(src)
|
||||
core = ncore
|
||||
icon_state = "core_container_loaded"
|
||||
user << "<span class='warning'>Container is sealing...</span>"
|
||||
to_chat(user, "<span class='warning'>Container is sealing...</span>")
|
||||
addtimer(CALLBACK(src, .proc/seal), 50)
|
||||
return 1
|
||||
|
||||
@@ -52,12 +52,12 @@
|
||||
icon_state = "core_container_sealed"
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 60, 1)
|
||||
if(ismob(loc))
|
||||
loc << "<span class='warning'>[src] is permanently sealed, [core]'s radiation is contained.</span>"
|
||||
to_chat(loc, "<span class='warning'>[src] is permanently sealed, [core]'s radiation is contained.</span>")
|
||||
|
||||
/obj/item/nuke_core_container/attackby(obj/item/nuke_core/core, mob/user)
|
||||
if(istype(core))
|
||||
if(!user.temporarilyRemoveItemFromInventory(core))
|
||||
user << "<span class='warning'>The [core] is stuck to your hand!</span>"
|
||||
to_chat(user, "<span class='warning'>The [core] is stuck to your hand!</span>")
|
||||
return
|
||||
else
|
||||
load(core, user)
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
/obj/item/weapon/banner/attack_self(mob/living/carbon/human/user)
|
||||
if(moralecooldown + moralewait > world.time)
|
||||
return
|
||||
user << "<span class='notice'>You increase the morale of your fellows!</span>"
|
||||
to_chat(user, "<span class='notice'>You increase the morale of your fellows!</span>")
|
||||
moralecooldown = world.time
|
||||
|
||||
for(var/mob/living/carbon/human/H in range(4,get_turf(src)))
|
||||
H << "<span class='notice'>Your morale is increased by [user]'s banner!</span>"
|
||||
to_chat(H, "<span class='notice'>Your morale is increased by [user]'s banner!</span>")
|
||||
H.adjustBruteLoss(-15)
|
||||
H.adjustFireLoss(-15)
|
||||
H.AdjustStunned(-2)
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
return
|
||||
if(AI.malf_picker)
|
||||
AI.malf_picker.processing_time += 50
|
||||
AI << "<span class='userdanger'>[user] has attempted to upgrade you with combat software that you already possess. You gain 50 points to spend on Malfunction Modules instead.</span>"
|
||||
to_chat(AI, "<span class='userdanger'>[user] has attempted to upgrade you with combat software that you already possess. You gain 50 points to spend on Malfunction Modules instead.</span>")
|
||||
else
|
||||
AI << "<span class='userdanger'>[user] has upgraded you with combat software!</span>"
|
||||
to_chat(AI, "<span class='userdanger'>[user] has upgraded you with combat software!</span>")
|
||||
AI.add_malf_picker()
|
||||
user << "<span class='notice'>You upgrade [AI]. [src] is consumed in the process.</span>"
|
||||
to_chat(user, "<span class='notice'>You upgrade [AI]. [src] is consumed in the process.</span>")
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
return
|
||||
if(AI.eyeobj)
|
||||
AI.eyeobj.relay_speech = TRUE
|
||||
AI << "<span class='userdanger'>[user] has upgraded you with surveillance software!</span>"
|
||||
AI << "Via a combination of hidden microphones and lip reading software, you are able to use your cameras to listen in on conversations."
|
||||
user << "<span class='notice'>You upgrade [AI]. [src] is consumed in the process.</span>"
|
||||
to_chat(AI, "<span class='userdanger'>[user] has upgraded you with surveillance software!</span>")
|
||||
to_chat(AI, "Via a combination of hidden microphones and lip reading software, you are able to use your cameras to listen in on conversations.")
|
||||
to_chat(user, "<span class='notice'>You upgrade [AI]. [src] is consumed in the process.</span>")
|
||||
qdel(src)
|
||||
|
||||
@@ -57,13 +57,13 @@
|
||||
mode = 0
|
||||
switch(mode)
|
||||
if(0)
|
||||
user << "Power reset. Hugs!"
|
||||
to_chat(user, "Power reset. Hugs!")
|
||||
if(1)
|
||||
user << "Power increased!"
|
||||
to_chat(user, "Power increased!")
|
||||
if(2)
|
||||
user << "BZZT. Electrifying arms..."
|
||||
to_chat(user, "BZZT. Electrifying arms...")
|
||||
if(3)
|
||||
user << "ERROR: ARM ACTUATORS OVERLOADED."
|
||||
to_chat(user, "ERROR: ARM ACTUATORS OVERLOADED.")
|
||||
|
||||
/obj/item/borg/cyborghug/attack(mob/living/M, mob/living/silicon/robot/user)
|
||||
if(M == user)
|
||||
@@ -172,7 +172,7 @@
|
||||
mode = "charge"
|
||||
else
|
||||
mode = "draw"
|
||||
user << "<span class='notice'>You toggle [src] to \"[mode]\" mode.</span>"
|
||||
to_chat(user, "<span class='notice'>You toggle [src] to \"[mode]\" mode.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/borg/charger/afterattack(obj/item/target, mob/living/silicon/robot/user, proximity_flag)
|
||||
@@ -182,10 +182,10 @@
|
||||
if(is_type_in_list(target, charge_machines))
|
||||
var/obj/machinery/M = target
|
||||
if((M.stat & (NOPOWER|BROKEN)) || !M.anchored)
|
||||
user << "<span class='warning'>[M] is unpowered!</span>"
|
||||
to_chat(user, "<span class='warning'>[M] is unpowered!</span>")
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You connect to [M]'s power line...</span>"
|
||||
to_chat(user, "<span class='notice'>You connect to [M]'s power line...</span>")
|
||||
while(do_after(user, 15, target = M, progress = 0))
|
||||
if(!user || !user.cell || mode != "draw")
|
||||
return
|
||||
@@ -198,27 +198,27 @@
|
||||
|
||||
M.use_power(200)
|
||||
|
||||
user << "<span class='notice'>You stop charging youself.</span>"
|
||||
to_chat(user, "<span class='notice'>You stop charging youself.</span>")
|
||||
|
||||
else if(is_type_in_list(target, charge_items))
|
||||
var/obj/item/weapon/stock_parts/cell/cell = target
|
||||
if(!istype(cell))
|
||||
cell = locate(/obj/item/weapon/stock_parts/cell) in target
|
||||
if(!cell)
|
||||
user << "<span class='warning'>[target] has no power cell!</span>"
|
||||
to_chat(user, "<span class='warning'>[target] has no power cell!</span>")
|
||||
return
|
||||
|
||||
if(istype(target, /obj/item/weapon/gun/energy))
|
||||
var/obj/item/weapon/gun/energy/E = target
|
||||
if(!E.can_charge)
|
||||
user << "<span class='warning'>[target] has no power port!</span>"
|
||||
to_chat(user, "<span class='warning'>[target] has no power port!</span>")
|
||||
return
|
||||
|
||||
if(!cell.charge)
|
||||
user << "<span class='warning'>[target] has no power!</span>"
|
||||
to_chat(user, "<span class='warning'>[target] has no power!</span>")
|
||||
|
||||
|
||||
user << "<span class='notice'>You connect to [target]'s power port...</span>"
|
||||
to_chat(user, "<span class='notice'>You connect to [target]'s power port...</span>")
|
||||
|
||||
while(do_after(user, 15, target = target, progress = 0))
|
||||
if(!user || !user.cell || mode != "draw")
|
||||
@@ -237,26 +237,26 @@
|
||||
break
|
||||
target.update_icon()
|
||||
|
||||
user << "<span class='notice'>You stop charging youself.</span>"
|
||||
to_chat(user, "<span class='notice'>You stop charging youself.</span>")
|
||||
|
||||
else if(is_type_in_list(target, charge_items))
|
||||
var/obj/item/weapon/stock_parts/cell/cell = target
|
||||
if(!istype(cell))
|
||||
cell = locate(/obj/item/weapon/stock_parts/cell) in target
|
||||
if(!cell)
|
||||
user << "<span class='warning'>[target] has no power cell!</span>"
|
||||
to_chat(user, "<span class='warning'>[target] has no power cell!</span>")
|
||||
return
|
||||
|
||||
if(istype(target, /obj/item/weapon/gun/energy))
|
||||
var/obj/item/weapon/gun/energy/E = target
|
||||
if(!E.can_charge)
|
||||
user << "<span class='warning'>[target] has no power port!</span>"
|
||||
to_chat(user, "<span class='warning'>[target] has no power port!</span>")
|
||||
return
|
||||
|
||||
if(cell.charge >= cell.maxcharge)
|
||||
user << "<span class='warning'>[target] is already charged!</span>"
|
||||
to_chat(user, "<span class='warning'>[target] is already charged!</span>")
|
||||
|
||||
user << "<span class='notice'>You connect to [target]'s power port...</span>"
|
||||
to_chat(user, "<span class='notice'>You connect to [target]'s power port...</span>")
|
||||
|
||||
while(do_after(user, 15, target = target, progress = 0))
|
||||
if(!user || !user.cell || mode != "charge")
|
||||
@@ -275,7 +275,7 @@
|
||||
break
|
||||
target.update_icon()
|
||||
|
||||
user << "<span class='notice'>You stop charging [target].</span>"
|
||||
to_chat(user, "<span class='notice'>You stop charging [target].</span>")
|
||||
|
||||
/obj/item/device/harmalarm
|
||||
name = "Sonic Harm Prevention Tool"
|
||||
@@ -287,20 +287,20 @@
|
||||
/obj/item/device/harmalarm/emag_act(mob/user)
|
||||
emagged = !emagged
|
||||
if(emagged)
|
||||
user << "<font color='red'>You short out the safeties on the [src]!</font>"
|
||||
to_chat(user, "<font color='red'>You short out the safeties on the [src]!</font>")
|
||||
else
|
||||
user << "<font color='red'>You reset the safeties on the [src]!</font>"
|
||||
to_chat(user, "<font color='red'>You reset the safeties on the [src]!</font>")
|
||||
|
||||
/obj/item/device/harmalarm/attack_self(mob/user)
|
||||
var/safety = !emagged
|
||||
if(cooldown > world.time)
|
||||
user << "<font color='red'>The device is still recharging!</font>"
|
||||
to_chat(user, "<font color='red'>The device is still recharging!</font>")
|
||||
return
|
||||
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R.cell.charge < 1200)
|
||||
user << "<font color='red'>You don't have enough charge to do this!</font>"
|
||||
to_chat(user, "<font color='red'>You don't have enough charge to do this!</font>")
|
||||
return
|
||||
R.cell.charge -= 1000
|
||||
if(R.emagged)
|
||||
@@ -319,7 +319,7 @@
|
||||
log_game("[user.ckey]([user]) used a Cyborg Harm Alarm in ([user.x],[user.y],[user.z])")
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
R.connected_ai << "<br><span class='notice'>NOTICE - Peacekeeping 'HARM ALARM' used by: [user]</span><br>"
|
||||
to_chat(R.connected_ai, "<br><span class='notice'>NOTICE - Peacekeeping 'HARM ALARM' used by: [user]</span><br>")
|
||||
|
||||
return
|
||||
|
||||
@@ -375,7 +375,7 @@
|
||||
|
||||
/obj/item/borg/lollipop/proc/dispense(atom/A, mob/user)
|
||||
if(candy <= 0)
|
||||
user << "<span class='warning'>No lollipops left in storage!</span>"
|
||||
to_chat(user, "<span class='warning'>No lollipops left in storage!</span>")
|
||||
return FALSE
|
||||
var/turf/T = get_turf(A)
|
||||
if(!T || !istype(T) || !isopenturf(T))
|
||||
@@ -387,13 +387,13 @@
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/lollipop(T)
|
||||
candy--
|
||||
check_amount()
|
||||
user << "<span class='notice'>Dispensing lollipop...</span>"
|
||||
to_chat(user, "<span class='notice'>Dispensing lollipop...</span>")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/borg/lollipop/proc/shootL(atom/target, mob/living/user, params)
|
||||
if(candy <= 0)
|
||||
user << "<span class='warning'>Not enough lollipops left!</span>"
|
||||
to_chat(user, "<span class='warning'>Not enough lollipops left!</span>")
|
||||
return FALSE
|
||||
candy--
|
||||
var/obj/item/ammo_casing/caseless/lollipop/A = new /obj/item/ammo_casing/caseless/lollipop(src)
|
||||
@@ -408,7 +408,7 @@
|
||||
|
||||
/obj/item/borg/lollipop/proc/shootG(atom/target, mob/living/user, params) //Most certainly a good idea.
|
||||
if(candy <= 0)
|
||||
user << "<span class='warning'>Not enough gumballs left!</span>"
|
||||
to_chat(user, "<span class='warning'>Not enough gumballs left!</span>")
|
||||
return FALSE
|
||||
candy--
|
||||
var/obj/item/ammo_casing/caseless/gumball/A = new /obj/item/ammo_casing/caseless/gumball(src)
|
||||
@@ -427,7 +427,7 @@
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(!R.cell.use(12))
|
||||
user << "<span class='warning'>Not enough power.</span>"
|
||||
to_chat(user, "<span class='warning'>Not enough power.</span>")
|
||||
return FALSE
|
||||
if(R.emagged)
|
||||
hitdamage = emaggedhitdamage
|
||||
@@ -446,13 +446,13 @@
|
||||
switch(mode)
|
||||
if(1)
|
||||
mode++
|
||||
user << "<span class='notice'>Module is now throwing lollipops.</span>"
|
||||
to_chat(user, "<span class='notice'>Module is now throwing lollipops.</span>")
|
||||
if(2)
|
||||
mode++
|
||||
user << "<span class='notice'>Module is now blasting gumballs.</span>"
|
||||
to_chat(user, "<span class='notice'>Module is now blasting gumballs.</span>")
|
||||
if(3)
|
||||
mode = 1
|
||||
user << "<span class='notice'>Module is now dispensing lollipops.</span>"
|
||||
to_chat(user, "<span class='notice'>Module is now dispensing lollipops.</span>")
|
||||
..()
|
||||
|
||||
/obj/item/ammo_casing/caseless/gumball
|
||||
|
||||
@@ -70,13 +70,13 @@
|
||||
if (M.use(1))
|
||||
var/obj/item/weapon/ed209_assembly/B = new /obj/item/weapon/ed209_assembly
|
||||
B.loc = get_turf(src)
|
||||
user << "<span class='notice'>You arm the robot frame.</span>"
|
||||
to_chat(user, "<span class='notice'>You arm the robot frame.</span>")
|
||||
var/holding_this = user.get_inactive_held_item()==src
|
||||
qdel(src)
|
||||
if (holding_this)
|
||||
user.put_in_inactive_hand(B)
|
||||
else
|
||||
user << "<span class='warning'>You need one sheet of metal to start building ED-209!</span>"
|
||||
to_chat(user, "<span class='warning'>You need one sheet of metal to start building ED-209!</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/bodypart/l_leg/robot))
|
||||
if(src.l_leg)
|
||||
@@ -130,15 +130,15 @@
|
||||
src.chest = CH
|
||||
src.updateicon()
|
||||
else if(!CH.wired)
|
||||
user << "<span class='warning'>You need to attach wires to it first!</span>"
|
||||
to_chat(user, "<span class='warning'>You need to attach wires to it first!</span>")
|
||||
else
|
||||
user << "<span class='warning'>You need to attach a cell to it first!</span>"
|
||||
to_chat(user, "<span class='warning'>You need to attach a cell to it first!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/bodypart/head/robot))
|
||||
var/obj/item/bodypart/head/robot/HD = W
|
||||
for(var/X in HD.contents)
|
||||
if(istype(X, /obj/item/organ))
|
||||
user << "<span class='warning'>There are organs inside [HD]!</span>"
|
||||
to_chat(user, "<span class='warning'>There are organs inside [HD]!</span>")
|
||||
return
|
||||
if(src.head)
|
||||
return
|
||||
@@ -150,39 +150,39 @@
|
||||
src.head = HD
|
||||
src.updateicon()
|
||||
else
|
||||
user << "<span class='warning'>You need to attach a flash to it first!</span>"
|
||||
to_chat(user, "<span class='warning'>You need to attach a flash to it first!</span>")
|
||||
|
||||
else if (istype(W, /obj/item/device/multitool))
|
||||
if(check_completion())
|
||||
Interact(user)
|
||||
else
|
||||
user << "<span class='warning'>The endoskeleton must be assembled before debugging can begin!</span>"
|
||||
to_chat(user, "<span class='warning'>The endoskeleton must be assembled before debugging can begin!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/device/mmi))
|
||||
var/obj/item/device/mmi/M = W
|
||||
if(check_completion())
|
||||
if(!isturf(loc))
|
||||
user << "<span class='warning'>You can't put [M] in, the frame has to be standing on the ground to be perfectly precise!</span>"
|
||||
to_chat(user, "<span class='warning'>You can't put [M] in, the frame has to be standing on the ground to be perfectly precise!</span>")
|
||||
return
|
||||
if(!M.brainmob)
|
||||
user << "<span class='warning'>Sticking an empty [M.name] into the frame would sort of defeat the purpose!</span>"
|
||||
to_chat(user, "<span class='warning'>Sticking an empty [M.name] into the frame would sort of defeat the purpose!</span>")
|
||||
return
|
||||
|
||||
var/mob/living/brain/BM = M.brainmob
|
||||
if(!BM.key || !BM.mind)
|
||||
user << "<span class='warning'>The MMI indicates that their mind is completely unresponsive; there's no point!</span>"
|
||||
to_chat(user, "<span class='warning'>The MMI indicates that their mind is completely unresponsive; there's no point!</span>")
|
||||
return
|
||||
|
||||
if(!BM.client) //braindead
|
||||
user << "<span class='warning'>The MMI indicates that their mind is currently inactive; it might change!</span>"
|
||||
to_chat(user, "<span class='warning'>The MMI indicates that their mind is currently inactive; it might change!</span>")
|
||||
return
|
||||
|
||||
if(BM.stat == DEAD || (M.brain && M.brain.damaged_brain))
|
||||
user << "<span class='warning'>Sticking a dead brain into the frame would sort of defeat the purpose!</span>"
|
||||
to_chat(user, "<span class='warning'>Sticking a dead brain into the frame would sort of defeat the purpose!</span>")
|
||||
return
|
||||
|
||||
if(jobban_isbanned(BM, "Cyborg"))
|
||||
user << "<span class='warning'>This [M.name] does not seem to fit!</span>"
|
||||
to_chat(user, "<span class='warning'>This [M.name] does not seem to fit!</span>")
|
||||
return
|
||||
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
@@ -221,8 +221,8 @@
|
||||
|
||||
if(O.mind && O.mind.special_role)
|
||||
O.mind.store_memory("As a cyborg, you must obey your silicon laws and master AI above all else. Your objectives will consider you to be dead.")
|
||||
O << "<span class='userdanger'>You have been robotized!</span>"
|
||||
O << "<span class='danger'>You must obey your silicon laws and master AI above all else. Your objectives will consider you to be dead.</span>"
|
||||
to_chat(O, "<span class='userdanger'>You have been robotized!</span>")
|
||||
to_chat(O, "<span class='danger'>You must obey your silicon laws and master AI above all else. Your objectives will consider you to be dead.</span>")
|
||||
|
||||
O.job = "Cyborg"
|
||||
|
||||
@@ -243,13 +243,13 @@
|
||||
if(!locomotion)
|
||||
O.lockcharge = 1
|
||||
O.update_canmove()
|
||||
O << "<span class='warning'>Error: Servo motors unresponsive.</span>"
|
||||
to_chat(O, "<span class='warning'>Error: Servo motors unresponsive.</span>")
|
||||
|
||||
else
|
||||
user << "<span class='warning'>The MMI must go in after everything else!</span>"
|
||||
to_chat(user, "<span class='warning'>The MMI must go in after everything else!</span>")
|
||||
|
||||
else if(istype(W,/obj/item/weapon/pen))
|
||||
user << "<span class='warning'>You need to use a multitool to name [src]!</span>"
|
||||
to_chat(user, "<span class='warning'>You need to use a multitool to name [src]!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
var/mob/living/living_user = usr
|
||||
var/obj/item/item_in_hand = living_user.get_active_held_item()
|
||||
if(!istype(item_in_hand, /obj/item/device/multitool))
|
||||
living_user << "<span class='warning'>You need a multitool!</span>"
|
||||
to_chat(living_user, "<span class='warning'>You need a multitool!</span>")
|
||||
return
|
||||
|
||||
if(href_list["Name"])
|
||||
@@ -287,7 +287,7 @@
|
||||
else if(href_list["Master"])
|
||||
forced_ai = select_active_ai(usr)
|
||||
if(!forced_ai)
|
||||
usr << "<span class='error'>No active AIs detected.</span>"
|
||||
to_chat(usr, "<span class='error'>No active AIs detected.</span>")
|
||||
|
||||
else if(href_list["Law"])
|
||||
lawsync = !lawsync
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
|
||||
/obj/item/borg/upgrade/proc/action(mob/living/silicon/robot/R)
|
||||
if(R.stat == DEAD)
|
||||
usr << "<span class='notice'>[src] will not function on a deceased cyborg.</span>"
|
||||
to_chat(usr, "<span class='notice'>[src] will not function on a deceased cyborg.</span>")
|
||||
return 1
|
||||
if(module_type && !istype(R.module, module_type))
|
||||
R << "Upgrade mounting error! No suitable hardpoint detected!"
|
||||
usr << "There's no mounting point for the module!"
|
||||
to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!")
|
||||
to_chat(usr, "There's no mounting point for the module!")
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/rename
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
/obj/item/borg/upgrade/restart/action(mob/living/silicon/robot/R)
|
||||
if(R.health < 0)
|
||||
usr << "<span class='warning'>You have to repair the cyborg before using this module!</span>"
|
||||
to_chat(usr, "<span class='warning'>You have to repair the cyborg before using this module!</span>")
|
||||
return 0
|
||||
|
||||
if(R.mind)
|
||||
@@ -78,8 +78,8 @@
|
||||
if(..())
|
||||
return
|
||||
if(R.speed < 0)
|
||||
R << "<span class='notice'>A VTEC unit is already installed!</span>"
|
||||
usr << "<span class='notice'>There's no room for another VTEC unit!</span>"
|
||||
to_chat(R, "<span class='notice'>A VTEC unit is already installed!</span>")
|
||||
to_chat(usr, "<span class='notice'>There's no room for another VTEC unit!</span>")
|
||||
return
|
||||
|
||||
R.speed = -2 // Gotta go fast.
|
||||
@@ -100,11 +100,11 @@
|
||||
|
||||
var/obj/item/weapon/gun/energy/disabler/cyborg/T = locate() in R.module.modules
|
||||
if(!T)
|
||||
usr << "<span class='notice'>There's no disabler in this unit!</span>"
|
||||
to_chat(usr, "<span class='notice'>There's no disabler in this unit!</span>")
|
||||
return
|
||||
if(T.charge_delay <= 2)
|
||||
R << "<span class='notice'>A cooling unit is already installed!</span>"
|
||||
usr << "<span class='notice'>There's no room for another cooling unit!</span>"
|
||||
to_chat(R, "<span class='notice'>A cooling unit is already installed!</span>")
|
||||
to_chat(usr, "<span class='notice'>There's no room for another cooling unit!</span>")
|
||||
return
|
||||
|
||||
T.charge_delay = max(2 , T.charge_delay - 4)
|
||||
@@ -122,7 +122,7 @@
|
||||
return
|
||||
|
||||
if(R.ionpulse)
|
||||
usr << "<span class='notice'>This unit already has ion thrusters installed!</span>"
|
||||
to_chat(usr, "<span class='notice'>This unit already has ion thrusters installed!</span>")
|
||||
return
|
||||
|
||||
R.ionpulse = TRUE
|
||||
@@ -222,7 +222,7 @@
|
||||
|
||||
var/obj/item/borg/upgrade/selfrepair/U = locate() in R
|
||||
if(U)
|
||||
usr << "<span class='warning'>This unit is already equipped with a self-repair module.</span>"
|
||||
to_chat(usr, "<span class='warning'>This unit is already equipped with a self-repair module.</span>")
|
||||
return 0
|
||||
|
||||
cyborg = R
|
||||
@@ -243,10 +243,10 @@
|
||||
/obj/item/borg/upgrade/selfrepair/ui_action_click()
|
||||
on = !on
|
||||
if(on)
|
||||
cyborg << "<span class='notice'>You activate the self-repair module.</span>"
|
||||
to_chat(cyborg, "<span class='notice'>You activate the self-repair module.</span>")
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
cyborg << "<span class='notice'>You deactivate the self-repair module.</span>"
|
||||
to_chat(cyborg, "<span class='notice'>You deactivate the self-repair module.</span>")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
@@ -271,12 +271,12 @@
|
||||
|
||||
if(cyborg && (cyborg.stat != DEAD) && on)
|
||||
if(!cyborg.cell)
|
||||
cyborg << "<span class='warning'>Self-repair module deactivated. Please, insert the power cell.</span>"
|
||||
to_chat(cyborg, "<span class='warning'>Self-repair module deactivated. Please, insert the power cell.</span>")
|
||||
deactivate()
|
||||
return
|
||||
|
||||
if(cyborg.cell.charge < powercost * 2)
|
||||
cyborg << "<span class='warning'>Self-repair module deactivated. Please recharge.</span>"
|
||||
to_chat(cyborg, "<span class='warning'>Self-repair module deactivated. Please recharge.</span>")
|
||||
deactivate()
|
||||
return
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
msgmode = "critical"
|
||||
else if(cyborg.health < cyborg.maxHealth)
|
||||
msgmode = "normal"
|
||||
cyborg << "<span class='notice'>Self-repair is active in <span class='boldnotice'>[msgmode]</span> mode.</span>"
|
||||
to_chat(cyborg, "<span class='notice'>Self-repair is active in <span class='boldnotice'>[msgmode]</span> mode.</span>")
|
||||
msg_cooldown = world.time
|
||||
else
|
||||
deactivate()
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
removeOverlays()
|
||||
user << "<span class='notice'>You slice off [src]'s uneven chunks of aluminium and scorch marks.</span>"
|
||||
to_chat(user, "<span class='notice'>You slice off [src]'s uneven chunks of aluminium and scorch marks.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
t_him = "him"
|
||||
else if(M.gender == FEMALE)
|
||||
t_him = "her"
|
||||
user << "<span class='danger'>\The [M] is dead, you cannot help [t_him]!</span>"
|
||||
to_chat(user, "<span class='danger'>\The [M] is dead, you cannot help [t_him]!</span>")
|
||||
return
|
||||
|
||||
if(!istype(M, /mob/living/carbon) && !istype(M, /mob/living/simple_animal))
|
||||
user << "<span class='danger'>You don't know how to apply \the [src] to [M]!</span>"
|
||||
to_chat(user, "<span class='danger'>You don't know how to apply \the [src] to [M]!</span>")
|
||||
return 1
|
||||
|
||||
var/obj/item/bodypart/affecting
|
||||
@@ -35,16 +35,16 @@
|
||||
var/mob/living/carbon/C = M
|
||||
affecting = C.get_bodypart(check_zone(user.zone_selected))
|
||||
if(!affecting) //Missing limb?
|
||||
user << "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>"
|
||||
to_chat(user, "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>")
|
||||
return
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(stop_bleeding)
|
||||
if(H.bleedsuppress)
|
||||
user << "<span class='warning'>[H]'s bleeding is already bandaged!</span>"
|
||||
to_chat(user, "<span class='warning'>[H]'s bleeding is already bandaged!</span>")
|
||||
return
|
||||
else if(!H.bleed_rate)
|
||||
user << "<span class='warning'>[H] isn't bleeding!</span>"
|
||||
to_chat(user, "<span class='warning'>[H] isn't bleeding!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -57,13 +57,13 @@
|
||||
if (istype(M, /mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/critter = M
|
||||
if (!(critter.healable))
|
||||
user << "<span class='notice'> You cannot use [src] on [M]!</span>"
|
||||
to_chat(user, "<span class='notice'> You cannot use [src] on [M]!</span>")
|
||||
return
|
||||
else if (critter.health == critter.maxHealth)
|
||||
user << "<span class='notice'> [M] is at full health.</span>"
|
||||
to_chat(user, "<span class='notice'> [M] is at full health.</span>")
|
||||
return
|
||||
else if(src.heal_brute < 1)
|
||||
user << "<span class='notice'> [src] won't help [M] at all.</span>"
|
||||
to_chat(user, "<span class='notice'> [src] won't help [M] at all.</span>")
|
||||
return
|
||||
user.visible_message("<span class='green'>[user] applies [src] on [M].</span>", "<span class='green'>You apply [src] on [M].</span>")
|
||||
else
|
||||
@@ -82,7 +82,7 @@
|
||||
var/mob/living/carbon/C = M
|
||||
affecting = C.get_bodypart(check_zone(user.zone_selected))
|
||||
if(!affecting) //Missing limb?
|
||||
user << "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>"
|
||||
to_chat(user, "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>")
|
||||
return
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
@@ -93,7 +93,7 @@
|
||||
if(affecting.heal_damage(heal_brute, heal_burn))
|
||||
C.update_damage_overlays()
|
||||
else
|
||||
user << "<span class='notice'>Medicine won't work on a robotic limb!</span>"
|
||||
to_chat(user, "<span class='notice'>Medicine won't work on a robotic limb!</span>")
|
||||
else
|
||||
M.heal_bodypart_damage((src.heal_brute/2), (src.heal_burn/2))
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ var/global/list/datum/stack_recipe/rod_recipes = list ( \
|
||||
attack_verb = list("hit", "bludgeoned", "whacked")
|
||||
hitsound = 'sound/weapons/grenadelaunch.ogg'
|
||||
|
||||
/obj/item/stack/rods/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/rods/Initialize(mapload, new_amount, merge = TRUE)
|
||||
..()
|
||||
|
||||
recipes = rod_recipes
|
||||
@@ -39,7 +39,7 @@ var/global/list/datum/stack_recipe/rod_recipes = list ( \
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(get_amount() < 2)
|
||||
user << "<span class='warning'>You need at least two rods to do this!</span>"
|
||||
to_chat(user, "<span class='warning'>You need at least two rods to do this!</span>")
|
||||
return
|
||||
|
||||
if(WT.remove_fuel(0,user))
|
||||
@@ -57,9 +57,9 @@ var/global/list/datum/stack_recipe/rod_recipes = list ( \
|
||||
else if(istype(W,/obj/item/weapon/reagent_containers/food/snacks))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/S = W
|
||||
if(amount != 1)
|
||||
user << "<span class='warning'>You must use a single rod!</span>"
|
||||
to_chat(user, "<span class='warning'>You must use a single rod!</span>")
|
||||
else if(S.w_class > WEIGHT_CLASS_SMALL)
|
||||
user << "<span class='warning'>The ingredient is too big for [src]!</span>"
|
||||
to_chat(user, "<span class='warning'>The ingredient is too big for [src]!</span>")
|
||||
else
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/customizable/A = new/obj/item/weapon/reagent_containers/food/snacks/customizable/kebab(get_turf(src))
|
||||
A.initialize_custom_food(src, S, user)
|
||||
|
||||
@@ -32,7 +32,7 @@ var/global/list/datum/stack_recipe/glass_recipes = list ( \
|
||||
/obj/item/stack/sheet/glass/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/sheet/glass/New(loc, amount)
|
||||
/obj/item/stack/sheet/glass/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = glass_recipes
|
||||
..()
|
||||
|
||||
@@ -41,11 +41,11 @@ var/global/list/datum/stack_recipe/glass_recipes = list ( \
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if (get_amount() < 1 || CC.get_amount() < 5)
|
||||
user << "<span class='warning>You need five lengths of coil and one sheet of glass to make wired glass!</span>"
|
||||
to_chat(user, "<span class='warning>You need five lengths of coil and one sheet of glass to make wired glass!</span>")
|
||||
return
|
||||
CC.use(5)
|
||||
use(1)
|
||||
user << "<span class='notice'>You attach wire to the [name].</span>"
|
||||
to_chat(user, "<span class='notice'>You attach wire to the [name].</span>")
|
||||
var/obj/item/stack/light_w/new_tile = new(user.loc)
|
||||
new_tile.add_fingerprint(user)
|
||||
else if(istype(W, /obj/item/stack/rods))
|
||||
@@ -61,7 +61,7 @@ var/global/list/datum/stack_recipe/glass_recipes = list ( \
|
||||
if (!G && replace)
|
||||
user.put_in_hands(RG)
|
||||
else
|
||||
user << "<span class='warning'>You need one rod and one sheet of glass to make reinforced glass!</span>"
|
||||
to_chat(user, "<span class='warning'>You need one rod and one sheet of glass to make reinforced glass!</span>")
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
@@ -106,7 +106,7 @@ var/global/list/datum/stack_recipe/reinforced_glass_recipes = list ( \
|
||||
source.add_charge(amount * metcost)
|
||||
glasource.add_charge(amount * glacost)
|
||||
|
||||
/obj/item/stack/sheet/rglass/New(loc, amount)
|
||||
/obj/item/stack/sheet/rglass/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = reinforced_glass_recipes
|
||||
..()
|
||||
|
||||
@@ -159,11 +159,11 @@ var/global/list/datum/stack_recipe/reinforced_glass_recipes = list ( \
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!H.gloves && !(PIERCEIMMUNE in H.dna.species.species_traits)) // golems, etc
|
||||
H << "<span class='warning'>[src] cuts into your hand!</span>"
|
||||
to_chat(H, "<span class='warning'>[src] cuts into your hand!</span>")
|
||||
H.apply_damage(force*0.5, BRUTE, hit_hand)
|
||||
else if(ismonkey(user))
|
||||
var/mob/living/carbon/monkey/M = user
|
||||
M << "<span class='warning'>[src] cuts into your hand!</span>"
|
||||
to_chat(M, "<span class='warning'>[src] cuts into your hand!</span>")
|
||||
M.apply_damage(force*0.5, BRUTE, hit_hand)
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ var/global/list/datum/stack_recipe/reinforced_glass_recipes = list ( \
|
||||
if(G.amount >= G.max_amount)
|
||||
continue
|
||||
G.attackby(NG, user)
|
||||
user << "<span class='notice'>You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s.</span>"
|
||||
to_chat(user, "<span class='notice'>You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s.</span>")
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -13,7 +13,7 @@ var/global/list/datum/stack_recipe/human_recipes = list( \
|
||||
new/datum/stack_recipe("bloated human costume", /obj/item/clothing/suit/hooded/bloated_human, 5, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/animalhide/human/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/animalhide/human/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = human_recipes
|
||||
return ..()
|
||||
|
||||
@@ -33,7 +33,7 @@ var/global/list/datum/stack_recipe/corgi_recipes = list ( \
|
||||
new/datum/stack_recipe("corgi costume", /obj/item/clothing/suit/hooded/ian_costume, 3, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/animalhide/corgi/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/animalhide/corgi/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = corgi_recipes
|
||||
return ..()
|
||||
|
||||
@@ -54,7 +54,7 @@ var/global/list/datum/stack_recipe/monkey_recipes = list ( \
|
||||
new/datum/stack_recipe("monkey suit", /obj/item/clothing/suit/monkeysuit, 2, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/animalhide/monkey/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/animalhide/monkey/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = monkey_recipes
|
||||
return ..()
|
||||
|
||||
@@ -75,7 +75,7 @@ var/global/list/datum/stack_recipe/xeno_recipes = list ( \
|
||||
new/datum/stack_recipe("alien suit", /obj/item/clothing/suit/xenos, 2, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/animalhide/xeno/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/animalhide/xeno/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = xeno_recipes
|
||||
return ..()
|
||||
|
||||
@@ -138,7 +138,7 @@ var/global/list/datum/stack_recipe/sinew_recipes = list ( \
|
||||
new/datum/stack_recipe("sinew restraints", /obj/item/weapon/restraints/handcuffs/sinew, 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/sinew/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/sinew/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = sinew_recipes
|
||||
return ..()
|
||||
/*
|
||||
@@ -173,7 +173,7 @@ var/global/list/datum/stack_recipe/sinew_recipes = list ( \
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 50, 1, -1)
|
||||
user.visible_message("[user] starts cutting hair off \the [src].", "<span class='notice'>You start cutting the hair off \the [src]...</span>", "<span class='italics'>You hear the sound of a knife rubbing against flesh.</span>")
|
||||
if(do_after(user,50, target = src))
|
||||
user << "<span class='notice'>You cut the hair from this [src.singular_name].</span>"
|
||||
to_chat(user, "<span class='notice'>You cut the hair from this [src.singular_name].</span>")
|
||||
//Try locating an exisitng stack on the tile and add to there if possible
|
||||
for(var/obj/item/stack/sheet/hairlesshide/HS in user.loc)
|
||||
if(HS.amount < 50)
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
if (M.use(1))
|
||||
use(1)
|
||||
var/obj/item/L = new /obj/item/stack/tile/light(user.loc)
|
||||
user << "<span class='notice'>You make a light tile.</span>"
|
||||
to_chat(user, "<span class='notice'>You make a light tile.</span>")
|
||||
L.add_fingerprint(user)
|
||||
else
|
||||
user << "<span class='warning'>You need one metal sheet to finish the light tile!</span>"
|
||||
to_chat(user, "<span class='warning'>You need one metal sheet to finish the light tile!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -71,7 +71,7 @@ var/global/list/datum/stack_recipe/sandbag_recipes = list ( \
|
||||
new/datum/stack_recipe("sandbags", /obj/structure/barricade/sandbags, 1, time = 25, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/mineral/sandbags/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/mineral/sandbags/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = sandbag_recipes
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
@@ -96,7 +96,7 @@ var/global/list/datum/stack_recipe/diamond_recipes = list ( \
|
||||
new/datum/stack_recipe("AI Core Statue", /obj/structure/statue/diamond/ai2, 5, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/mineral/diamond/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/mineral/diamond/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = diamond_recipes
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
@@ -120,7 +120,7 @@ var/global/list/datum/stack_recipe/uranium_recipes = list ( \
|
||||
new/datum/stack_recipe("Engineer Statue", /obj/structure/statue/uranium/eng, 5, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/mineral/uranium/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/mineral/uranium/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = uranium_recipes
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
@@ -146,7 +146,7 @@ var/global/list/datum/stack_recipe/plasma_recipes = list ( \
|
||||
new/datum/stack_recipe("Scientist Statue", /obj/structure/statue/plasma/scientist, 5, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/mineral/plasma/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/mineral/plasma/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = plasma_recipes
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
@@ -186,7 +186,7 @@ var/global/list/datum/stack_recipe/gold_recipes = list ( \
|
||||
new/datum/stack_recipe("CMO Statue", /obj/structure/statue/gold/cmo, 5, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/mineral/gold/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/mineral/gold/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = gold_recipes
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
@@ -213,7 +213,7 @@ var/global/list/datum/stack_recipe/silver_recipes = list ( \
|
||||
new/datum/stack_recipe("Med Borg Statue", /obj/structure/statue/silver/medborg, 5, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/mineral/silver/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/mineral/silver/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = silver_recipes
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
@@ -235,7 +235,7 @@ var/global/list/datum/stack_recipe/clown_recipes = list ( \
|
||||
new/datum/stack_recipe("Clown Statue", /obj/structure/statue/bananium/clown, 5, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/mineral/bananium/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/mineral/bananium/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = clown_recipes
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
@@ -261,7 +261,7 @@ var/global/list/datum/stack_recipe/titanium_recipes = list ( \
|
||||
new/datum/stack_recipe("titanium tile", /obj/item/stack/tile/mineral/titanium, 1, 4, 20), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/mineral/titanium/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/mineral/titanium/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = titanium_recipes
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
@@ -288,7 +288,7 @@ var/global/list/datum/stack_recipe/plastitanium_recipes = list ( \
|
||||
new/datum/stack_recipe("plas-titanium tile", /obj/item/stack/tile/mineral/plastitanium, 1, 4, 20), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/mineral/plastitanium/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/mineral/plastitanium/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = plastitanium_recipes
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
@@ -313,7 +313,7 @@ var/global/list/datum/stack_recipe/snow_recipes = list ( \
|
||||
new/datum/stack_recipe("Snowball", /obj/item/toy/snowball, 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/mineral/snow/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/mineral/snow/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = snow_recipes
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
@@ -373,6 +373,6 @@ var/global/list/datum/stack_recipe/abductor_recipes = list ( \
|
||||
new/datum/stack_recipe("Abductor Sciencist Statue", /obj/structure/statue/bananium/clown, 5, one_per_turf = 1, on_floor = 1)*/
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/mineral/abductor/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/mineral/abductor/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = abductor_recipes
|
||||
..()
|
||||
|
||||
@@ -38,7 +38,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||
new/datum/stack_recipe("firelock frame", /obj/structure/firelock_frame, 3, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("meatspike frame", /obj/structure/kitchenspike_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \
|
||||
/* new/datum/stack_recipe("reflector frame", /obj/structure/reflector, 5, time = 25, one_per_turf = 1, on_floor = 1), \*/
|
||||
new/datum/stack_recipe("reflector frame", /obj/structure/reflector, 5, time = 25, one_per_turf = 1, on_floor = 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \
|
||||
new/datum/stack_recipe("light fixture frame", /obj/item/wallframe/light_fixture, 2), \
|
||||
@@ -85,7 +85,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||
is_cyborg = 1
|
||||
cost = 500
|
||||
|
||||
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/metal/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = metal_recipes
|
||||
return ..()
|
||||
|
||||
@@ -111,7 +111,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
|
||||
resistance_flags = FIRE_PROOF
|
||||
merge_type = /obj/item/stack/sheet/plasteel
|
||||
|
||||
/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/plasteel/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = plasteel_recipes
|
||||
return ..()
|
||||
|
||||
@@ -160,7 +160,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
|
||||
resistance_flags = FLAMMABLE
|
||||
merge_type = /obj/item/stack/sheet/mineral/wood
|
||||
|
||||
/obj/item/stack/sheet/mineral/wood/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/mineral/wood/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = wood_recipes
|
||||
return ..()
|
||||
|
||||
@@ -205,7 +205,7 @@ var/global/list/datum/stack_recipe/cloth_recipes = list ( \
|
||||
throwforce = 0
|
||||
merge_type = /obj/item/stack/sheet/cloth
|
||||
|
||||
/obj/item/stack/sheet/cloth/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/cloth/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = cloth_recipes
|
||||
return ..()
|
||||
|
||||
@@ -237,7 +237,7 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
|
||||
resistance_flags = FLAMMABLE
|
||||
merge_type = /obj/item/stack/sheet/cardboard
|
||||
|
||||
/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/cardboard/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = cardboard_recipes
|
||||
return ..()
|
||||
|
||||
@@ -272,20 +272,20 @@ var/global/list/datum/stack_recipe/runed_metal_recipes = list ( \
|
||||
|
||||
/obj/item/stack/sheet/runed_metal/attack_self(mob/living/user)
|
||||
if(!iscultist(user))
|
||||
user << "<span class='warning'>Only one with forbidden knowledge could hope to work this metal...</span>"
|
||||
to_chat(user, "<span class='warning'>Only one with forbidden knowledge could hope to work this metal...</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/runed_metal/attack(atom/target, mob/living/user)
|
||||
if(!iscultist(user))
|
||||
user << "<span class='warning'>Only one with forbidden knowledge could hope to work this metal...</span>"
|
||||
to_chat(user, "<span class='warning'>Only one with forbidden knowledge could hope to work this metal...</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/stack/sheet/runed_metal/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/sheet/runed_metal/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/sheet/runed_metal/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = runed_metal_recipes
|
||||
return ..()
|
||||
|
||||
@@ -322,7 +322,7 @@ var/global/list/datum/stack_recipe/brass_recipes = list ( \
|
||||
new /obj/item/stack/sheet/runed_metal(loc, amount)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/tile/brass/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/tile/brass/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = brass_recipes
|
||||
..()
|
||||
pixel_x = 0
|
||||
@@ -368,7 +368,6 @@ var/global/list/datum/stack_recipe/plastic_recipes = list(
|
||||
singular_name = "plastic sheet"
|
||||
icon_state = "sheet-plastic"
|
||||
throwforce = 7
|
||||
flags = CONDUCT
|
||||
origin_tech = "materials=1"
|
||||
origin_tech = "materials=1;biotech=1"
|
||||
merge_type = /obj/item/stack/sheet/plastic
|
||||
@@ -379,6 +378,6 @@ var/global/list/datum/stack_recipe/plastic_recipes = list(
|
||||
/obj/item/stack/sheet/plastic/five
|
||||
amount = 5
|
||||
|
||||
/obj/item/stack/sheet/plastic/New()
|
||||
/obj/item/stack/sheet/plastic/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = plastic_recipes
|
||||
. = ..()
|
||||
|
||||
@@ -19,42 +19,45 @@
|
||||
var/cost = 1 // How much energy from storage it costs
|
||||
var/merge_type = null // This path and its children should merge with this stack, defaults to src.type
|
||||
|
||||
/obj/item/stack/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/Initialize(mapload, new_amount=null , merge = TRUE)
|
||||
..()
|
||||
if (amount)
|
||||
src.amount = amount
|
||||
if(new_amount)
|
||||
amount = new_amount
|
||||
if(!merge_type)
|
||||
merge_type = src.type
|
||||
return
|
||||
merge_type = type
|
||||
if(merge)
|
||||
for(var/obj/item/stack/S in loc)
|
||||
if(S.merge_type == merge_type)
|
||||
merge(S)
|
||||
|
||||
/obj/item/stack/Destroy()
|
||||
if (usr && usr.machine==src)
|
||||
usr << browse(null, "window=stack")
|
||||
return ..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/examine(mob/user)
|
||||
..()
|
||||
if (is_cyborg)
|
||||
if(src.singular_name)
|
||||
user << "There is enough energy for [src.get_amount()] [src.singular_name]\s."
|
||||
to_chat(user, "There is enough energy for [src.get_amount()] [src.singular_name]\s.")
|
||||
else
|
||||
user << "There is enough energy for [src.get_amount()]."
|
||||
to_chat(user, "There is enough energy for [src.get_amount()].")
|
||||
return
|
||||
if(src.singular_name)
|
||||
if(src.get_amount()>1)
|
||||
user << "There are [src.get_amount()] [src.singular_name]\s in the stack."
|
||||
to_chat(user, "There are [src.get_amount()] [src.singular_name]\s in the stack.")
|
||||
else
|
||||
user << "There is [src.get_amount()] [src.singular_name] in the stack."
|
||||
to_chat(user, "There is [src.get_amount()] [src.singular_name] in the stack.")
|
||||
else if(src.get_amount()>1)
|
||||
user << "There are [src.get_amount()] in the stack."
|
||||
to_chat(user, "There are [src.get_amount()] in the stack.")
|
||||
else
|
||||
user << "There is [src.get_amount()] in the stack."
|
||||
to_chat(user, "There is [src.get_amount()] in the stack.")
|
||||
|
||||
/obj/item/stack/proc/get_amount()
|
||||
if (is_cyborg)
|
||||
return round(source.energy / cost)
|
||||
if(is_cyborg)
|
||||
. = round(source.energy / cost)
|
||||
else
|
||||
return (amount)
|
||||
. = (amount)
|
||||
|
||||
/obj/item/stack/attack_self(mob/user)
|
||||
interact(user)
|
||||
@@ -101,7 +104,6 @@
|
||||
t1 += "</TT></body></HTML>"
|
||||
user << browse(t1, "window=stack")
|
||||
onclose(user, "stack")
|
||||
return
|
||||
|
||||
/obj/item/stack/Topic(href, href_list)
|
||||
..()
|
||||
@@ -161,18 +163,18 @@
|
||||
/obj/item/stack/proc/building_checks(datum/stack_recipe/R, multiplier)
|
||||
if (src.get_amount() < R.req_amount*multiplier)
|
||||
if (R.req_amount*multiplier>1)
|
||||
usr << "<span class='warning'>You haven't got enough [src] to build \the [R.req_amount*multiplier] [R.title]\s!</span>"
|
||||
to_chat(usr, "<span class='warning'>You haven't got enough [src] to build \the [R.req_amount*multiplier] [R.title]\s!</span>")
|
||||
else
|
||||
usr << "<span class='warning'>You haven't got enough [src] to build \the [R.title]!</span>"
|
||||
to_chat(usr, "<span class='warning'>You haven't got enough [src] to build \the [R.title]!</span>")
|
||||
return 0
|
||||
if(R.window_checks && !valid_window_location(usr.loc, usr.dir))
|
||||
usr << "<span class='warning'>The [R.title] won't fit here!</span>"
|
||||
to_chat(usr, "<span class='warning'>The [R.title] won't fit here!</span>")
|
||||
return 0
|
||||
if(R.one_per_turf && (locate(R.result_type) in usr.loc))
|
||||
usr << "<span class='warning'>There is another [R.title] here!</span>"
|
||||
to_chat(usr, "<span class='warning'>There is another [R.title] here!</span>")
|
||||
return 0
|
||||
if(R.on_floor && !isfloorturf(usr.loc))
|
||||
usr << "<span class='warning'>\The [R.title] must be constructed on the floor!</span>"
|
||||
to_chat(usr, "<span class='warning'>\The [R.title] must be constructed on the floor!</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -204,7 +206,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/proc/merge(obj/item/stack/S) //Merge src into S, as much as possible
|
||||
if(QDELETED(S) || S == src) //amusingly this can cause a stack to consume itself, let's not allow that.
|
||||
if(QDELETED(S) || QDELETED(src) || S == src) //amusingly this can cause a stack to consume itself, let's not allow that.
|
||||
return
|
||||
var/transfer = get_amount()
|
||||
if(S.is_cyborg)
|
||||
@@ -220,12 +222,12 @@
|
||||
/obj/item/stack/Crossed(obj/o)
|
||||
if(istype(o, merge_type) && !o.throwing)
|
||||
merge(o)
|
||||
return ..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/hitby(atom/movable/AM, skip, hitpush)
|
||||
if(istype(AM, merge_type))
|
||||
merge(AM)
|
||||
return ..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/attack_hand(mob/user)
|
||||
if (user.get_inactive_held_item() == src)
|
||||
@@ -234,11 +236,10 @@
|
||||
change_stack(user,1)
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/stack/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src))
|
||||
user << "<span class='warning'>You can't do that right now!</span>"
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!in_range(src, user))
|
||||
return
|
||||
@@ -253,10 +254,10 @@
|
||||
return
|
||||
else
|
||||
change_stack(user,stackmaterial)
|
||||
user << "<span class='notice'>You take [stackmaterial] sheets out of the stack</span>"
|
||||
to_chat(user, "<span class='notice'>You take [stackmaterial] sheets out of the stack</span>")
|
||||
|
||||
/obj/item/stack/proc/change_stack(mob/user,amount)
|
||||
var/obj/item/stack/F = new src.type(user, amount)
|
||||
var/obj/item/stack/F = new type(user, amount, FALSE)
|
||||
. = F
|
||||
F.copy_evidences(src)
|
||||
user.put_in_hands(F)
|
||||
@@ -270,9 +271,9 @@
|
||||
if(istype(W, merge_type))
|
||||
var/obj/item/stack/S = W
|
||||
merge(S)
|
||||
user << "<span class='notice'>Your [S.name] stack now contains [S.get_amount()] [S.singular_name]\s.</span>"
|
||||
to_chat(user, "<span class='notice'>Your [S.name] stack now contains [S.get_amount()] [S.singular_name]\s.</span>")
|
||||
else
|
||||
return ..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/proc/copy_evidences(obj/item/stack/from as obj)
|
||||
src.blood_DNA = from.blood_DNA
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
if(I && I.imp_in)
|
||||
I.hidden_uplink.telecrystals += amount
|
||||
use(amount)
|
||||
user << "<span class='notice'>You press [src] onto yourself and charge your hidden uplink.</span>"
|
||||
to_chat(user, "<span class='notice'>You press [src] onto yourself and charge your hidden uplink.</span>")
|
||||
|
||||
/obj/item/stack/telecrystal/afterattack(obj/item/I, mob/user, proximity)
|
||||
if(!proximity)
|
||||
@@ -24,7 +24,7 @@
|
||||
if(I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up.
|
||||
I.hidden_uplink.telecrystals += amount
|
||||
use(amount)
|
||||
user << "<span class='notice'>You slot [src] into the [I] and charge its internal uplink.</span>"
|
||||
to_chat(user, "<span class='notice'>You slot [src] into the [I] and charge its internal uplink.</span>")
|
||||
|
||||
/obj/item/stack/telecrystal/five
|
||||
amount = 5
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(get_amount() < 4)
|
||||
user << "<span class='warning'>You need at least four tiles to do this!</span>"
|
||||
to_chat(user, "<span class='warning'>You need at least four tiles to do this!</span>")
|
||||
return
|
||||
|
||||
if(WT.is_hot() && !mineralType)
|
||||
user << "<span class='warning'>You can not reform this!</span>"
|
||||
to_chat(user, "<span class='warning'>You can not reform this!</span>")
|
||||
return
|
||||
|
||||
if(WT.remove_fuel(0,user))
|
||||
@@ -111,6 +111,18 @@
|
||||
/obj/item/stack/tile/fakespace/loaded
|
||||
amount = 30
|
||||
|
||||
/obj/item/stack/tile/fakepit
|
||||
name = "fake pits"
|
||||
singular_name = "fake pit"
|
||||
desc = "A piece of carpet with a forced perspective illusion of a pit. No way this could fool anyone!"
|
||||
icon_state = "tile_pit"
|
||||
turf_type = /turf/open/floor/fakepit
|
||||
resistance_flags = FLAMMABLE
|
||||
merge_type = /obj/item/stack/tile/fakepit
|
||||
|
||||
/obj/item/stack/tile/fakepit/loaded
|
||||
amount = 30
|
||||
|
||||
//High-traction
|
||||
/obj/item/stack/tile/noslip
|
||||
name = "high-traction floor tile"
|
||||
@@ -124,6 +136,34 @@
|
||||
/obj/item/stack/tile/noslip/thirty
|
||||
amount = 30
|
||||
|
||||
//Circuit
|
||||
/obj/item/stack/tile/circuit
|
||||
name = "blue circuit tile"
|
||||
singular_name = "blue circuit tile"
|
||||
desc = "A blue circuit tile."
|
||||
icon_state = "tile_bcircuit"
|
||||
turf_type = /turf/open/floor/circuit
|
||||
|
||||
/obj/item/stack/tile/circuit/green
|
||||
name = "green circuit tile"
|
||||
singular_name = "green circuit tile"
|
||||
desc = "A green circuit tile."
|
||||
icon_state = "tile_gcircuit"
|
||||
turf_type = /turf/open/floor/circuit/green
|
||||
|
||||
/obj/item/stack/tile/circuit/green/anim
|
||||
turf_type = /turf/open/floor/circuit/green/anim
|
||||
|
||||
/obj/item/stack/tile/circuit/red
|
||||
name = "red circuit tile"
|
||||
singular_name = "red circuit tile"
|
||||
desc = "A red circuit tile."
|
||||
icon_state = "tile_rcircuit"
|
||||
turf_type = /turf/open/floor/circuit/red
|
||||
|
||||
/obj/item/stack/tile/circuit/red/anim
|
||||
turf_type = /turf/open/floor/circuit/red/anim
|
||||
|
||||
//Pod floor
|
||||
/obj/item/stack/tile/pod
|
||||
name = "pod floor tile"
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
if(O.opened)
|
||||
return
|
||||
if(!O.delivery_icon) //no delivery icon means unwrappable closet (e.g. body bags)
|
||||
user << "<span class='warning'>You can't wrap this!</span>"
|
||||
to_chat(user, "<span class='warning'>You can't wrap this!</span>")
|
||||
return
|
||||
if(use(3))
|
||||
var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc))
|
||||
@@ -90,14 +90,14 @@
|
||||
P.add_fingerprint(user)
|
||||
O.add_fingerprint(user)
|
||||
else
|
||||
user << "<span class='warning'>You need more paper!</span>"
|
||||
to_chat(user, "<span class='warning'>You need more paper!</span>")
|
||||
return
|
||||
else
|
||||
user << "<span class='warning'>The object you are trying to wrap is unsuitable for the sorting machinery!</span>"
|
||||
to_chat(user, "<span class='warning'>The object you are trying to wrap is unsuitable for the sorting machinery!</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] wraps [target].</span>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='blue'>Has used [name] on [target]</font>")
|
||||
user.log_message("<font color='blue'>Has used [name] on [target]</font>", INDIVIDUAL_ATTACK_LOG)
|
||||
|
||||
/obj/item/stack/packageWrap/Destroy()
|
||||
if(!amount)
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
|
||||
if(O.reagents)
|
||||
var/message = O.reagents.generate_taste_message(taste_sensitivity)
|
||||
user << "<span class='notice'>[src] tastes <span class='italics'>[message]</span> in [O].</span>"
|
||||
to_chat(user, "<span class='notice'>[src] tastes <span class='italics'>[message]</span> in [O].</span>")
|
||||
|
||||
@@ -53,12 +53,12 @@
|
||||
if (istype(A, /obj/structure/reagent_dispensers))
|
||||
var/obj/structure/reagent_dispensers/RD = A
|
||||
if(RD.reagents.total_volume <= 0)
|
||||
user << "<span class='warning'>[RD] is empty.</span>"
|
||||
to_chat(user, "<span class='warning'>[RD] is empty.</span>")
|
||||
else if(reagents.total_volume >= 10)
|
||||
user << "<span class='warning'>[src] is full.</span>"
|
||||
to_chat(user, "<span class='warning'>[src] is full.</span>")
|
||||
else
|
||||
A.reagents.trans_to(src, 10)
|
||||
user << "<span class='notice'>You fill the balloon with the contents of [A].</span>"
|
||||
to_chat(user, "<span class='notice'>You fill the balloon with the contents of [A].</span>")
|
||||
desc = "A translucent balloon with some form of liquid sloshing around in it."
|
||||
update_icon()
|
||||
|
||||
@@ -66,12 +66,12 @@
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/glass))
|
||||
if(I.reagents)
|
||||
if(I.reagents.total_volume <= 0)
|
||||
user << "<span class='warning'>[I] is empty.</span>"
|
||||
to_chat(user, "<span class='warning'>[I] is empty.</span>")
|
||||
else if(reagents.total_volume >= 10)
|
||||
user << "<span class='warning'>[src] is full.</span>"
|
||||
to_chat(user, "<span class='warning'>[src] is full.</span>")
|
||||
else
|
||||
desc = "A translucent balloon with some form of liquid sloshing around in it."
|
||||
user << "<span class='notice'>You fill the balloon with the contents of [I].</span>"
|
||||
to_chat(user, "<span class='notice'>You fill the balloon with the contents of [I].</span>")
|
||||
I.reagents.trans_to(src, 10)
|
||||
update_icon()
|
||||
else if(I.is_sharp())
|
||||
@@ -146,23 +146,23 @@
|
||||
|
||||
/obj/item/toy/gun/examine(mob/user)
|
||||
..()
|
||||
user << "There [bullets == 1 ? "is" : "are"] [bullets] cap\s left."
|
||||
to_chat(user, "There [bullets == 1 ? "is" : "are"] [bullets] cap\s left.")
|
||||
|
||||
/obj/item/toy/gun/attackby(obj/item/toy/ammo/gun/A, mob/user, params)
|
||||
|
||||
if(istype(A, /obj/item/toy/ammo/gun))
|
||||
if (src.bullets >= 7)
|
||||
user << "<span class='warning'>It's already fully loaded!</span>"
|
||||
to_chat(user, "<span class='warning'>It's already fully loaded!</span>")
|
||||
return 1
|
||||
if (A.amount_left <= 0)
|
||||
user << "<span class='warning'>There are no more caps!</span>"
|
||||
to_chat(user, "<span class='warning'>There are no more caps!</span>")
|
||||
return 1
|
||||
if (A.amount_left < (7 - src.bullets))
|
||||
src.bullets += A.amount_left
|
||||
user << text("<span class='notice'>You reload [] cap\s.</span>", A.amount_left)
|
||||
to_chat(user, text("<span class='notice'>You reload [] cap\s.</span>", A.amount_left))
|
||||
A.amount_left = 0
|
||||
else
|
||||
user << text("<span class='notice'>You reload [] cap\s.</span>", 7 - src.bullets)
|
||||
to_chat(user, text("<span class='notice'>You reload [] cap\s.</span>", 7 - src.bullets))
|
||||
A.amount_left -= 7 - src.bullets
|
||||
src.bullets = 7
|
||||
A.update_icon()
|
||||
@@ -174,7 +174,7 @@
|
||||
if (flag)
|
||||
return
|
||||
if (!user.IsAdvancedToolUser())
|
||||
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
if (src.bullets < 1)
|
||||
@@ -201,7 +201,7 @@
|
||||
|
||||
/obj/item/toy/ammo/gun/examine(mob/user)
|
||||
..()
|
||||
user << "There [amount_left == 1 ? "is" : "are"] [amount_left] cap\s left."
|
||||
to_chat(user, "There [amount_left == 1 ? "is" : "are"] [amount_left] cap\s left.")
|
||||
|
||||
/*
|
||||
* Toy swords
|
||||
@@ -220,7 +220,7 @@
|
||||
/obj/item/toy/sword/attack_self(mob/user)
|
||||
active = !( active )
|
||||
if (active)
|
||||
user << "<span class='notice'>You extend the plastic blade with a quick flick of your wrist.</span>"
|
||||
to_chat(user, "<span class='notice'>You extend the plastic blade with a quick flick of your wrist.</span>")
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 20, 1)
|
||||
if(hacked)
|
||||
icon_state = "swordrainbow"
|
||||
@@ -230,7 +230,7 @@
|
||||
item_state = "swordblue"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
else
|
||||
user << "<span class='notice'>You push the plastic blade back down into the handle.</span>"
|
||||
to_chat(user, "<span class='notice'>You push the plastic blade back down into the handle.</span>")
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 20, 1)
|
||||
icon_state = "sword0"
|
||||
item_state = "sword0"
|
||||
@@ -241,10 +241,10 @@
|
||||
/obj/item/toy/sword/attackby(obj/item/weapon/W, mob/living/user, params)
|
||||
if(istype(W, /obj/item/toy/sword))
|
||||
if((W.flags & NODROP) || (flags & NODROP))
|
||||
user << "<span class='warning'>\the [flags & NODROP ? src : W] is stuck to your hand, you can't attach it to \the [flags & NODROP ? W : src]!</span>"
|
||||
to_chat(user, "<span class='warning'>\the [flags & NODROP ? src : W] is stuck to your hand, you can't attach it to \the [flags & NODROP ? W : src]!</span>")
|
||||
return
|
||||
else
|
||||
user << "<span class='notice'>You attach the ends of the two plastic swords, making a single double-bladed toy! You're fake-cool.</span>"
|
||||
to_chat(user, "<span class='notice'>You attach the ends of the two plastic swords, making a single double-bladed toy! You're fake-cool.</span>")
|
||||
var/obj/item/weapon/twohanded/dualsaber/toy/newSaber = new /obj/item/weapon/twohanded/dualsaber/toy(user.loc)
|
||||
if(hacked) // That's right, we'll only check the "original" "sword".
|
||||
newSaber.hacked = 1
|
||||
@@ -255,13 +255,13 @@
|
||||
if(hacked == 0)
|
||||
hacked = 1
|
||||
item_color = "rainbow"
|
||||
user << "<span class='warning'>RNBW_ENGAGE</span>"
|
||||
to_chat(user, "<span class='warning'>RNBW_ENGAGE</span>")
|
||||
|
||||
if(active)
|
||||
icon_state = "swordrainbow"
|
||||
user.update_inv_hands()
|
||||
else
|
||||
user << "<span class='warning'>It's already fabulous!</span>"
|
||||
to_chat(user, "<span class='warning'>It's already fabulous!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -347,7 +347,7 @@
|
||||
if(ishuman(H) || issilicon(H)) //i guess carp and shit shouldn't set them off
|
||||
var/mob/living/carbon/M = H
|
||||
if(issilicon(H) || M.m_intent == MOVE_INTENT_RUN)
|
||||
M << "<span class='danger'>You step on the snap pop!</span>"
|
||||
to_chat(M, "<span class='danger'>You step on the snap pop!</span>")
|
||||
pop_burst(2, 0)
|
||||
|
||||
/obj/item/toy/snappop/phoenix
|
||||
@@ -380,7 +380,7 @@
|
||||
//all credit to skasi for toy mech fun ideas
|
||||
/obj/item/toy/prize/attack_self(mob/user)
|
||||
if(timer < world.time)
|
||||
user << "<span class='notice'>You play with [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You play with [src].</span>")
|
||||
timer = world.time + cooldown
|
||||
if(!quiet)
|
||||
playsound(user, 'sound/mecha/mechstep.ogg', 20, 1)
|
||||
@@ -694,7 +694,7 @@
|
||||
return
|
||||
var/choice = null
|
||||
if(cards.len == 0)
|
||||
user << "<span class='warning'>There are no more cards to draw!</span>"
|
||||
to_chat(user, "<span class='warning'>There are no more cards to draw!</span>")
|
||||
return
|
||||
var/obj/item/toy/cards/singlecard/H = new/obj/item/toy/cards/singlecard(user.loc)
|
||||
if(holo)
|
||||
@@ -732,25 +732,25 @@
|
||||
var/obj/item/toy/cards/singlecard/SC = I
|
||||
if(SC.parentdeck == src)
|
||||
if(!user.temporarilyRemoveItemFromInventory(SC))
|
||||
user << "<span class='warning'>The card is stuck to your hand, you can't add it to the deck!</span>"
|
||||
to_chat(user, "<span class='warning'>The card is stuck to your hand, you can't add it to the deck!</span>")
|
||||
return
|
||||
cards += SC.cardname
|
||||
user.visible_message("[user] adds a card to the bottom of the deck.","<span class='notice'>You add the card to the bottom of the deck.</span>")
|
||||
qdel(SC)
|
||||
else
|
||||
user << "<span class='warning'>You can't mix cards from other decks!</span>"
|
||||
to_chat(user, "<span class='warning'>You can't mix cards from other decks!</span>")
|
||||
update_icon()
|
||||
else if(istype(I, /obj/item/toy/cards/cardhand))
|
||||
var/obj/item/toy/cards/cardhand/CH = I
|
||||
if(CH.parentdeck == src)
|
||||
if(!user.temporarilyRemoveItemFromInventory(CH))
|
||||
user << "<span class='warning'>The hand of cards is stuck to your hand, you can't add it to the deck!</span>"
|
||||
to_chat(user, "<span class='warning'>The hand of cards is stuck to your hand, you can't add it to the deck!</span>")
|
||||
return
|
||||
cards += CH.currenthand
|
||||
user.visible_message("[user] puts their hand of cards in the deck.", "<span class='notice'>You put the hand of cards in the deck.</span>")
|
||||
qdel(CH)
|
||||
else
|
||||
user << "<span class='warning'>You can't mix cards from other decks!</span>"
|
||||
to_chat(user, "<span class='warning'>You can't mix cards from other decks!</span>")
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
@@ -762,15 +762,15 @@
|
||||
if(Adjacent(usr))
|
||||
if(over_object == M && loc != M)
|
||||
M.put_in_hands(src)
|
||||
usr << "<span class='notice'>You pick up the deck.</span>"
|
||||
to_chat(usr, "<span class='notice'>You pick up the deck.</span>")
|
||||
|
||||
else if(istype(over_object, /obj/screen/inventory/hand))
|
||||
var/obj/screen/inventory/hand/H = over_object
|
||||
if(M.putItemFromInventoryInHandIfPossible(src, H.held_index))
|
||||
usr << "<span class='notice'>You pick up the deck.</span>"
|
||||
to_chat(usr, "<span class='notice'>You pick up the deck.</span>")
|
||||
|
||||
else
|
||||
usr << "<span class='warning'>You can't reach it from here!</span>"
|
||||
to_chat(usr, "<span class='warning'>You can't reach it from here!</span>")
|
||||
|
||||
|
||||
|
||||
@@ -833,7 +833,7 @@
|
||||
qdel(src)
|
||||
N.pickup(cardUser)
|
||||
cardUser.put_in_hands(N)
|
||||
cardUser << "<span class='notice'>You also take [currenthand[1]] and hold it.</span>"
|
||||
to_chat(cardUser, "<span class='notice'>You also take [currenthand[1]] and hold it.</span>")
|
||||
cardUser << browse(null, "window=cardhand")
|
||||
return
|
||||
|
||||
@@ -851,7 +851,7 @@
|
||||
else if(currenthand.len > 2)
|
||||
src.icon_state = "[deckstyle]_hand3"
|
||||
else
|
||||
user << "<span class='warning'>You can't mix cards from other decks!</span>"
|
||||
to_chat(user, "<span class='warning'>You can't mix cards from other decks!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -884,7 +884,7 @@
|
||||
if(cardUser.is_holding(src))
|
||||
cardUser.visible_message("[cardUser] checks [cardUser.p_their()] card.", "<span class='notice'>The card reads: [cardname]</span>")
|
||||
else
|
||||
cardUser << "<span class='warning'>You need to have the card in your hand to check it!</span>"
|
||||
to_chat(cardUser, "<span class='warning'>You need to have the card in your hand to check it!</span>")
|
||||
|
||||
|
||||
/obj/item/toy/cards/singlecard/verb/Flip()
|
||||
@@ -917,13 +917,13 @@
|
||||
H.currenthand += src.cardname
|
||||
H.parentdeck = C.parentdeck
|
||||
H.apply_card_vars(H,C)
|
||||
user << "<span class='notice'>You combine the [C.cardname] and the [src.cardname] into a hand.</span>"
|
||||
to_chat(user, "<span class='notice'>You combine the [C.cardname] and the [src.cardname] into a hand.</span>")
|
||||
qdel(C)
|
||||
qdel(src)
|
||||
H.pickup(user)
|
||||
user.put_in_active_hand(H)
|
||||
else
|
||||
user << "<span class='warning'>You can't mix cards from other decks!</span>"
|
||||
to_chat(user, "<span class='warning'>You can't mix cards from other decks!</span>")
|
||||
|
||||
if(istype(I, /obj/item/toy/cards/cardhand/))
|
||||
var/obj/item/toy/cards/cardhand/H = I
|
||||
@@ -939,7 +939,7 @@
|
||||
else if(H.currenthand.len > 2)
|
||||
H.icon_state = "[deckstyle]_hand3"
|
||||
else
|
||||
user << "<span class='warning'>You can't mix cards from other decks!</span>"
|
||||
to_chat(user, "<span class='warning'>You can't mix cards from other decks!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -1007,7 +1007,7 @@
|
||||
icon_state = "nuketoyidle"
|
||||
else
|
||||
var/timeleft = (cooldown - world.time)
|
||||
user << "<span class='alert'>Nothing happens, and '</span>[round(timeleft/10)]<span class='alert'>' appears on a small display.</span>"
|
||||
to_chat(user, "<span class='alert'>Nothing happens, and '</span>[round(timeleft/10)]<span class='alert'>' appears on a small display.</span>")
|
||||
|
||||
/*
|
||||
* Fake meteor
|
||||
@@ -1051,7 +1051,7 @@
|
||||
//Attack self
|
||||
/obj/item/toy/carpplushie/attack_self(mob/user)
|
||||
playsound(src.loc, bitesound, 20, 1)
|
||||
user << "<span class='notice'>You pet [src]. D'awww.</span>"
|
||||
to_chat(user, "<span class='notice'>You pet [src]. D'awww.</span>")
|
||||
return ..()
|
||||
|
||||
/*
|
||||
@@ -1076,7 +1076,7 @@
|
||||
shake_camera(M, 2, 1) // Shakes player camera 2 squares for 1 second.
|
||||
|
||||
else
|
||||
user << "<span class='alert'>Nothing happens.</span>"
|
||||
to_chat(user, "<span class='alert'>Nothing happens.</span>")
|
||||
|
||||
/*
|
||||
* Snowballs
|
||||
@@ -1138,7 +1138,7 @@
|
||||
if(src)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else
|
||||
user << "<span class='warning'>The string on [src] hasn't rewound all the way!</span>"
|
||||
to_chat(user, "<span class='warning'>The string on [src] hasn't rewound all the way!</span>")
|
||||
return
|
||||
|
||||
// TOY MOUSEYS :3 :3 :3
|
||||
@@ -1173,7 +1173,7 @@
|
||||
/obj/item/toy/figure/attack_self(mob/user as mob)
|
||||
if(cooldown <= world.time)
|
||||
cooldown = world.time + 50
|
||||
user << "<span class='notice'>The [src] says \"[toysay]\"</span>"
|
||||
to_chat(user, "<span class='notice'>The [src] says \"[toysay]\"</span>")
|
||||
playsound(user, toysound, 20, 1)
|
||||
|
||||
/obj/item/toy/figure/cmo
|
||||
@@ -1378,7 +1378,7 @@
|
||||
if(!new_name)
|
||||
return
|
||||
doll_name = new_name
|
||||
user << "You name the dummy as \"[doll_name]\""
|
||||
to_chat(user, "You name the dummy as \"[doll_name]\"")
|
||||
name = "[initial(name)] - [doll_name]"
|
||||
|
||||
/obj/item/toy/dummy/talk_into(atom/movable/M, message, channel, list/spans)
|
||||
|
||||
@@ -34,14 +34,14 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/proc/show_laws(var/mob/user as mob)
|
||||
if(laws.len)
|
||||
user << "<B>Programmed Law[(laws.len > 1) ? "s" : ""]:</B>"
|
||||
to_chat(user, "<B>Programmed Law[(laws.len > 1) ? "s" : ""]:</B>")
|
||||
for(var/law in laws)
|
||||
user << "\"[law]\""
|
||||
to_chat(user, "\"[law]\"")
|
||||
|
||||
//The proc other things should be calling
|
||||
/obj/item/weapon/aiModule/proc/install(datum/ai_laws/law_datum, mob/user)
|
||||
if(!bypass_law_amt_check && (!laws.len || laws[1] == "")) //So we don't loop trough an empty list and end up with runtimes.
|
||||
user << "<span class='warning'>ERROR: No laws found on board.</span>"
|
||||
to_chat(user, "<span class='warning'>ERROR: No laws found on board.</span>")
|
||||
return
|
||||
|
||||
var/overflow = FALSE
|
||||
@@ -53,16 +53,16 @@ AI MODULES
|
||||
if(mylaw != "")
|
||||
tot_laws++
|
||||
if(tot_laws > config.silicon_max_law_amount && !bypass_law_amt_check)//allows certain boards to avoid this check, eg: reset
|
||||
user << "<span class='caution'>Not enough memory allocated to [law_datum.owner ? law_datum.owner : "the AI core"]'s law processor to handle this amount of laws."
|
||||
to_chat(user, "<span class='caution'>Not enough memory allocated to [law_datum.owner ? law_datum.owner : "the AI core"]'s law processor to handle this amount of laws.")
|
||||
message_admins("[key_name_admin(user)] tried to upload laws to [law_datum.owner ? key_name_admin(law_datum.owner) : "an AI core"] that would exceed the law cap.")
|
||||
overflow = TRUE
|
||||
|
||||
var/law2log = transmitInstructions(law_datum, user, overflow) //Freeforms return something extra we need to log
|
||||
if(law_datum.owner)
|
||||
user << "<span class='notice'>Upload complete. [law_datum.owner]'s laws have been modified.</span>"
|
||||
to_chat(user, "<span class='notice'>Upload complete. [law_datum.owner]'s laws have been modified.</span>")
|
||||
law_datum.owner.law_change_counter++
|
||||
else
|
||||
user << "<span class='notice'>Upload complete.</span>"
|
||||
to_chat(user, "<span class='notice'>Upload complete.</span>")
|
||||
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
var/ainame = law_datum.owner ? law_datum.owner.name : "empty AI core"
|
||||
@@ -74,7 +74,7 @@ AI MODULES
|
||||
//The proc that actually changes the silicon's laws.
|
||||
/obj/item/weapon/aiModule/proc/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow = FALSE)
|
||||
if(law_datum.owner)
|
||||
law_datum.owner << "<span class='userdanger'>[sender] has uploaded a change to the laws you must follow using a [name].</span>"
|
||||
to_chat(law_datum.owner, "<span class='userdanger'>[sender] has uploaded a change to the laws you must follow using a [name].</span>")
|
||||
|
||||
|
||||
/******************** Modules ********************/
|
||||
@@ -110,10 +110,10 @@ AI MODULES
|
||||
/obj/item/weapon/aiModule/zeroth/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
if(law_datum.owner)
|
||||
if(law_datum.owner.laws.zeroth)
|
||||
law_datum.owner << "[sender.real_name] attempted to modify your zeroth law."
|
||||
law_datum.owner << "It would be in your best interest to play along with [sender.real_name] that:"
|
||||
to_chat(law_datum.owner, "[sender.real_name] attempted to modify your zeroth law.")
|
||||
to_chat(law_datum.owner, "It would be in your best interest to play along with [sender.real_name] that:")
|
||||
for(var/failedlaw in laws)
|
||||
law_datum.owner << "[failedlaw]"
|
||||
to_chat(law_datum.owner, "[failedlaw]")
|
||||
return 1
|
||||
|
||||
for(var/templaw in laws)
|
||||
@@ -161,7 +161,7 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/supplied/safeguard/install(datum/ai_laws/law_datum, mob/user)
|
||||
if(!targetName)
|
||||
user << "No name detected on module, please enter one."
|
||||
to_chat(user, "No name detected on module, please enter one.")
|
||||
return 0
|
||||
..()
|
||||
|
||||
@@ -188,7 +188,7 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/zeroth/oneHuman/install(datum/ai_laws/law_datum, mob/user)
|
||||
if(!targetName)
|
||||
user << "No name detected on module, please enter one."
|
||||
to_chat(user, "No name detected on module, please enter one.")
|
||||
return 0
|
||||
..()
|
||||
|
||||
@@ -255,7 +255,7 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/supplied/freeform/install(datum/ai_laws/law_datum, mob/user)
|
||||
if(laws[1] == "")
|
||||
user << "No law detected on module, please create one."
|
||||
to_chat(user, "No law detected on module, please create one.")
|
||||
return 0
|
||||
..()
|
||||
|
||||
@@ -274,15 +274,15 @@ AI MODULES
|
||||
if(lawpos == null)
|
||||
return
|
||||
if(lawpos <= 0)
|
||||
user << "<span class='warning'>Error: The law number of [lawpos] is invalid.</span>"
|
||||
to_chat(user, "<span class='warning'>Error: The law number of [lawpos] is invalid.</span>")
|
||||
lawpos = 1
|
||||
return
|
||||
user << "<span class='notice'>Law [lawpos] selected.</span>"
|
||||
to_chat(user, "<span class='notice'>Law [lawpos] selected.</span>")
|
||||
..()
|
||||
|
||||
/obj/item/weapon/aiModule/remove/install(datum/ai_laws/law_datum, mob/user)
|
||||
if(lawpos > (law_datum.get_law_amount(list(LAW_INHERENT = 1, LAW_SUPPLIED = 1))))
|
||||
user << "<span class='warning'>There is no law [lawpos] to delete!</span>"
|
||||
to_chat(user, "<span class='warning'>There is no law [lawpos] to delete!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -482,7 +482,7 @@ AI MODULES
|
||||
/obj/item/weapon/aiModule/syndicate/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
// ..() //We don't want this module reporting to the AI who dun it. --NEO
|
||||
if(law_datum.owner)
|
||||
law_datum.owner << "<span class='warning'>BZZZZT</span>"
|
||||
to_chat(law_datum.owner, "<span class='warning'>BZZZZT</span>")
|
||||
if(!overflow)
|
||||
law_datum.owner.add_ion_law(laws[1])
|
||||
else
|
||||
@@ -507,7 +507,7 @@ AI MODULES
|
||||
/obj/item/weapon/aiModule/toyAI/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
//..()
|
||||
if(law_datum.owner)
|
||||
law_datum.owner << "<span class='warning'>BZZZZT</span>"
|
||||
to_chat(law_datum.owner, "<span class='warning'>BZZZZT</span>")
|
||||
if(!overflow)
|
||||
law_datum.owner.add_ion_law(laws[1])
|
||||
else
|
||||
@@ -521,7 +521,7 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/toyAI/attack_self(mob/user)
|
||||
laws[1] = generate_ion_law()
|
||||
user << "<span class='notice'>You press the button on [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You press the button on [src].</span>")
|
||||
playsound(user, 'sound/machines/click.ogg', 20, 1)
|
||||
src.loc.visible_message("<span class='warning'>\icon[src] [laws[1]]</span>")
|
||||
|
||||
|
||||
@@ -39,35 +39,7 @@ RCD
|
||||
var/list/conf_access = null
|
||||
var/use_one_access = 0 //If the airlock should require ALL or only ONE of the listed accesses.
|
||||
|
||||
/* Construction costs */
|
||||
|
||||
var/wallcost = 16
|
||||
var/floorcost = 2
|
||||
var/grillecost = 4
|
||||
var/girderupgradecost = 8
|
||||
var/windowcost = 8
|
||||
var/reinforcedwindowcost = 12
|
||||
var/airlockcost = 16
|
||||
var/decongirdercost = 13
|
||||
var/deconwallcost = 26
|
||||
var/deconfloorcost = 33
|
||||
var/decongrillecost = 4
|
||||
var/deconwindowcost = 8
|
||||
var/deconairlockcost = 32
|
||||
|
||||
/* Build delays (deciseconds) */
|
||||
|
||||
var/walldelay = 20
|
||||
var/floordelay = null //space wind's a bitch
|
||||
var/grilledelay = 40
|
||||
var/windowdelay = 40
|
||||
var/airlockdelay = 50
|
||||
var/decongirderdelay = 20
|
||||
var/deconwalldelay = 40
|
||||
var/deconfloordelay = 50
|
||||
var/decongrilledelay = null //as rapid as wirecutters
|
||||
var/deconwindowdelay = 50
|
||||
var/deconairlockdelay = 50
|
||||
var/delay_mod = 1
|
||||
|
||||
var/no_ammo_message = "<span class='warning'>The \'Low Ammo\' light on \
|
||||
the RCD blinks yellow.</span>"
|
||||
@@ -90,8 +62,7 @@ RCD
|
||||
window_type = /obj/structure/window/fulltile
|
||||
window_type_name = "glass"
|
||||
|
||||
usr << "<span class='notice'>You change \the [src]'s window mode \
|
||||
to [window_type_name].</span>"
|
||||
to_chat(usr, "<span class='notice'>You change \the [src]'s window mode to [window_type_name].</span>")
|
||||
|
||||
/obj/item/weapon/rcd/verb/change_airlock_access()
|
||||
set name = "Change Airlock Access"
|
||||
@@ -179,7 +150,6 @@ RCD
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
airlockcost = initial(airlockcost)
|
||||
var airlockcat = input(usr, "Select whether the airlock is solid or glass.") in list("Solid", "Glass")
|
||||
switch(airlockcat)
|
||||
if("Solid")
|
||||
@@ -208,7 +178,6 @@ RCD
|
||||
airlock_type = /obj/machinery/door/airlock/external
|
||||
if("High Security")
|
||||
airlock_type = /obj/machinery/door/airlock/highsecurity
|
||||
airlockcost += 2 * sheetmultiplier //extra cost
|
||||
else
|
||||
airlock_type = /obj/machinery/door/airlock
|
||||
|
||||
@@ -240,7 +209,6 @@ RCD
|
||||
|
||||
/obj/item/weapon/rcd/New()
|
||||
..()
|
||||
|
||||
desc = "An RCD. It currently holds [matter]/[max_matter] matter-units."
|
||||
src.spark_system = new /datum/effect_system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
@@ -261,7 +229,7 @@ RCD
|
||||
if(istype(W, /obj/item/weapon/rcd_ammo))
|
||||
var/obj/item/weapon/rcd_ammo/R = W
|
||||
if((matter + R.ammoamt) > max_matter)
|
||||
user << "<span class='warning'>The RCD can't hold any more matter-units!</span>"
|
||||
to_chat(user, "<span class='warning'>The RCD can't hold any more matter-units!</span>")
|
||||
return
|
||||
qdel(W)
|
||||
matter += R.ammoamt
|
||||
@@ -272,7 +240,7 @@ RCD
|
||||
else if(istype(W, /obj/item/stack/sheet/plasteel))
|
||||
loaded = loadwithsheets(W, plasteelmultiplier*sheetmultiplier, user) //Plasteel is worth 3 times more than glass or metal
|
||||
if(loaded)
|
||||
user << "<span class='notice'>The RCD now holds [matter]/[max_matter] matter-units.</span>"
|
||||
to_chat(user, "<span class='notice'>The RCD now holds [matter]/[max_matter] matter-units.</span>")
|
||||
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
|
||||
else
|
||||
return ..()
|
||||
@@ -284,9 +252,9 @@ RCD
|
||||
S.use(amount_to_use)
|
||||
matter += value*amount_to_use
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
user << "<span class='notice'>You insert [amount_to_use] [S.name] sheets into the RCD. </span>"
|
||||
to_chat(user, "<span class='notice'>You insert [amount_to_use] [S.name] sheets into the RCD. </span>")
|
||||
return 1
|
||||
user << "<span class='warning'>You can't insert any more [S.name] sheets into the RCD!"
|
||||
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into the RCD!")
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/rcd/attack_self(mob/user)
|
||||
@@ -295,16 +263,16 @@ RCD
|
||||
switch(mode)
|
||||
if(1)
|
||||
mode = 2
|
||||
user << "<span class='notice'>You change RCD's mode to 'Airlock'.</span>"
|
||||
to_chat(user, "<span class='notice'>You change RCD's mode to 'Airlock'.</span>")
|
||||
if(2)
|
||||
mode = 3
|
||||
user << "<span class='notice'>You change RCD's mode to 'Deconstruct'.</span>"
|
||||
to_chat(user, "<span class='notice'>You change RCD's mode to 'Deconstruct'.</span>")
|
||||
if(3)
|
||||
mode = 4
|
||||
user << "<span class='notice'>You change RCD's mode to 'Grilles & Windows'.</span>"
|
||||
to_chat(user, "<span class='notice'>You change RCD's mode to 'Grilles & Windows'.</span>")
|
||||
if(4)
|
||||
mode = 1
|
||||
user << "<span class='notice'>You change RCD's mode to 'Floor & Walls'.</span>"
|
||||
to_chat(user, "<span class='notice'>You change RCD's mode to 'Floor & Walls'.</span>")
|
||||
|
||||
if(prob(20))
|
||||
src.spark_system.start()
|
||||
@@ -314,217 +282,23 @@ RCD
|
||||
|
||||
|
||||
/obj/item/weapon/rcd/afterattack(atom/A, mob/user, proximity)
|
||||
if(!proximity) return 0
|
||||
if(istype(A,/turf/open/space/transit))
|
||||
return 0
|
||||
if(!(isturf(A) || istype(A, /obj/machinery/door/airlock) || istype(A, /obj/structure/grille) || istype(A, /obj/structure/window) || istype(A, /obj/structure/girder)))
|
||||
return 0
|
||||
|
||||
switch(mode)
|
||||
if(1)
|
||||
if(isspaceturf(A))
|
||||
var/turf/open/space/S = A
|
||||
if(useResource(floorcost, user))
|
||||
user << "<span class='notice'>You start building a floor...</span>"
|
||||
activate()
|
||||
S.ChangeTurf(/turf/open/floor/plating)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(isfloorturf(A))
|
||||
var/turf/open/floor/F = A
|
||||
if(checkResource(wallcost, user))
|
||||
user << "<span class='notice'>You start building a wall...</span>"
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, walldelay, target = A))
|
||||
if(!istype(F)) return 0
|
||||
if(!useResource(wallcost, user)) return 0
|
||||
activate()
|
||||
F.ChangeTurf(/turf/closed/wall)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/structure/girder))
|
||||
var/turf/open/floor/F = get_turf(A)
|
||||
if(checkResource(girderupgradecost, user))
|
||||
user << "<span class='notice'>You start finishing the \
|
||||
wall...</span>"
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, walldelay, target = A))
|
||||
if(!istype(A)) return 0
|
||||
if(!useResource(girderupgradecost, user)) return 0
|
||||
activate()
|
||||
qdel(A)
|
||||
F.ChangeTurf(/turf/closed/wall)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(2)
|
||||
if(isfloorturf(A))
|
||||
if(checkResource(airlockcost, user))
|
||||
var/door_check = 1
|
||||
for(var/obj/machinery/door/D in A)
|
||||
if(!D.sub_door)
|
||||
door_check = 0
|
||||
break
|
||||
|
||||
if(door_check)
|
||||
user << "<span class='notice'>You start building an airlock...</span>"
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, airlockdelay, target = A))
|
||||
if(!useResource(airlockcost, user)) return 0
|
||||
activate()
|
||||
var/obj/machinery/door/airlock/T = new airlock_type( A )
|
||||
|
||||
T.electronics = new/obj/item/weapon/electronics/airlock( src.loc )
|
||||
|
||||
if(conf_access)
|
||||
T.electronics.accesses = conf_access.Copy()
|
||||
T.electronics.one_access = use_one_access
|
||||
|
||||
if(T.electronics.one_access)
|
||||
T.req_one_access = T.electronics.accesses
|
||||
else
|
||||
T.req_access = T.electronics.accesses
|
||||
|
||||
if(!T.checkForMultipleDoors())
|
||||
qdel(T)
|
||||
useResource(-airlockcost, user)
|
||||
return 0
|
||||
T.autoclose = 1
|
||||
return 1
|
||||
return 0
|
||||
else
|
||||
user << "<span class='warning'>There is another door here!</span>"
|
||||
return 0
|
||||
return 0
|
||||
|
||||
if(3)
|
||||
if(iswallturf(A))
|
||||
var/turf/closed/wall/W = A
|
||||
if(istype(W, /turf/closed/wall/r_wall) && !canRturf)
|
||||
return 0
|
||||
if(checkResource(deconwallcost, user))
|
||||
user << "<span class='notice'>You start deconstructing [W]...</span>"
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, deconwalldelay, target = A))
|
||||
if(!useResource(deconwallcost, user)) return 0
|
||||
activate()
|
||||
W.ChangeTurf(/turf/open/floor/plating)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(isfloorturf(A))
|
||||
var/turf/open/floor/F = A
|
||||
if(istype(F, /turf/open/floor/engine) && !canRturf)
|
||||
return 0
|
||||
if(istype(F, F.baseturf))
|
||||
user << "<span class='notice'>You can't dig any deeper!</span>"
|
||||
return 0
|
||||
else if(checkResource(deconfloorcost, user))
|
||||
user << "<span class='notice'>You start deconstructing floor...</span>"
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, deconfloordelay, target = A))
|
||||
if(!useResource(deconfloorcost, user)) return 0
|
||||
activate()
|
||||
F.ChangeTurf(F.baseturf)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/machinery/door/airlock))
|
||||
if(checkResource(deconairlockcost, user))
|
||||
user << "<span class='notice'>You start deconstructing airlock...</span>"
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, deconairlockdelay, target = A))
|
||||
if(!useResource(deconairlockcost, user)) return 0
|
||||
activate()
|
||||
qdel(A)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/structure/window))
|
||||
if(checkResource(deconwindowcost, user))
|
||||
user << "<span class='notice'>You start deconstructing the window...</span>"
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, deconwindowdelay, target = A))
|
||||
if(!useResource(deconwindowcost, user)) return 0
|
||||
activate()
|
||||
qdel(A)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/structure/grille))
|
||||
var/obj/structure/grille/G = A
|
||||
if(!G.shock(user, 90)) //if it's shocked, try to shock them
|
||||
if(useResource(decongrillecost, user))
|
||||
user << "<span class='notice'>You start deconstructing the grille...</span>"
|
||||
activate()
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
qdel(A)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/structure/girder))
|
||||
if(useResource(decongirdercost, user))
|
||||
user << "<span class='notice'>You start deconstructing \
|
||||
[A]...</span>"
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, decongirderdelay, target = A))
|
||||
if(!useResource(decongirdercost, user)) return 0
|
||||
activate()
|
||||
qdel(A)
|
||||
return 1
|
||||
|
||||
if (4)
|
||||
if(isfloorturf(A))
|
||||
if(checkResource(grillecost, user))
|
||||
if(locate(/obj/structure/grille) in A)
|
||||
user << "<span class='warning'>There is already a grille there!</span>"
|
||||
return 0
|
||||
user << "<span class='notice'>You start building a grille...</span>"
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, grilledelay, target = A))
|
||||
if(locate(/obj/structure/grille) in A)
|
||||
return 0
|
||||
if(!useResource(grillecost, user)) return 0
|
||||
activate()
|
||||
var/obj/structure/grille/G = new/obj/structure/grille(A)
|
||||
G.anchored = 1
|
||||
return 1
|
||||
return 0
|
||||
return 0
|
||||
if(istype(A, /obj/structure/grille))
|
||||
var wname = "window?"
|
||||
var cost = 0
|
||||
if (window_type == /obj/structure/window/fulltile)
|
||||
cost = windowcost
|
||||
wname = "window"
|
||||
else if (window_type == /obj/structure/window/reinforced/fulltile)
|
||||
cost = reinforcedwindowcost
|
||||
wname = "reinforced window"
|
||||
|
||||
if(checkResource(cost, user))
|
||||
user << "<span class='notice'>You start building a \
|
||||
[wname]...</span>"
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, windowdelay, target = A))
|
||||
if(locate(/obj/structure/window) in A.loc) return 0
|
||||
if(!useResource(cost, user)) return 0
|
||||
activate()
|
||||
var /obj/structure/window/WD = new window_type(A.loc)
|
||||
WD.anchored = 1
|
||||
return 1
|
||||
return 0
|
||||
return 0
|
||||
|
||||
else
|
||||
user << "ERROR: RCD in MODE: [mode] attempted use by [user]. Send this text #coderbus or an admin."
|
||||
return 0
|
||||
if(!proximity)
|
||||
return FALSE
|
||||
var/list/rcd_results = A.rcd_vals(user, src)
|
||||
if(!rcd_results)
|
||||
return FALSE
|
||||
if(do_after(user, rcd_results["delay"] * delay_mod, target = A))
|
||||
if(checkResource(rcd_results["cost"], user))
|
||||
if(A.rcd_act(user, src, rcd_results["mode"]))
|
||||
useResource(rcd_results["cost"], user)
|
||||
activate()
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/weapon/rcd/proc/useResource(amount, mob/user)
|
||||
if(matter < amount)
|
||||
if(user)
|
||||
user << no_ammo_message
|
||||
to_chat(user, no_ammo_message)
|
||||
return 0
|
||||
matter -= amount
|
||||
desc = "An RCD. It currently holds [matter]/[max_matter] matter-units."
|
||||
@@ -533,7 +307,7 @@ RCD
|
||||
/obj/item/weapon/rcd/proc/checkResource(amount, mob/user)
|
||||
. = matter >= amount
|
||||
if(!. && user)
|
||||
user << no_ammo_message
|
||||
to_chat(user, no_ammo_message)
|
||||
return .
|
||||
|
||||
/obj/item/weapon/rcd/proc/detonate_pulse()
|
||||
@@ -560,11 +334,11 @@ RCD
|
||||
var/mob/living/silicon/robot/borgy = user
|
||||
if(!borgy.cell)
|
||||
if(user)
|
||||
user << no_ammo_message
|
||||
to_chat(user, no_ammo_message)
|
||||
return 0
|
||||
. = borgy.cell.use(amount * 72) //borgs get 1.3x the use of their RCDs
|
||||
if(!. && user)
|
||||
user << no_ammo_message
|
||||
to_chat(user, no_ammo_message)
|
||||
return .
|
||||
|
||||
/obj/item/weapon/rcd/borg/checkResource(amount, mob/user)
|
||||
@@ -573,11 +347,11 @@ RCD
|
||||
var/mob/living/silicon/robot/borgy = user
|
||||
if(!borgy.cell)
|
||||
if(user)
|
||||
user << no_ammo_message
|
||||
to_chat(user, no_ammo_message)
|
||||
return 0
|
||||
. = borgy.cell.charge >= (amount * 72)
|
||||
if(!. && user)
|
||||
user << no_ammo_message
|
||||
to_chat(user, no_ammo_message)
|
||||
return .
|
||||
|
||||
/obj/item/weapon/rcd/loaded
|
||||
@@ -587,7 +361,6 @@ RCD
|
||||
name = "industrial RCD"
|
||||
max_matter = 500
|
||||
matter = 500
|
||||
canRturf = 1
|
||||
|
||||
/obj/item/weapon/rcd_ammo
|
||||
name = "compressed matter cartridge"
|
||||
@@ -603,3 +376,9 @@ RCD
|
||||
origin_tech = "materials=4"
|
||||
materials = list(MAT_METAL=48000, MAT_GLASS=32000)
|
||||
ammoamt = 160
|
||||
|
||||
|
||||
/obj/item/weapon/rcd/admin
|
||||
name = "admin RCD"
|
||||
max_matter = INFINITY
|
||||
matter = INFINITY
|
||||
|
||||
@@ -547,14 +547,14 @@ var/global/list/RPD_recipes=list(
|
||||
return
|
||||
|
||||
if(EATING_MODE) //Eating pipes
|
||||
user << "<span class='notice'>You start destroying a pipe...</span>"
|
||||
to_chat(user, "<span class='notice'>You start destroying a pipe...</span>")
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 2, target = A))
|
||||
activate()
|
||||
qdel(A)
|
||||
|
||||
if(ATMOS_MODE) //Making pipes
|
||||
user << "<span class='notice'>You start building a pipe...</span>"
|
||||
to_chat(user, "<span class='notice'>You start building a pipe...</span>")
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 2, target = A))
|
||||
activate()
|
||||
@@ -564,7 +564,7 @@ var/global/list/RPD_recipes=list(
|
||||
P.add_fingerprint(usr)
|
||||
|
||||
if(METER_MODE) //Making pipe meters
|
||||
user << "<span class='notice'>You start building a meter...</span>"
|
||||
to_chat(user, "<span class='notice'>You start building a meter...</span>")
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 2, target = A))
|
||||
activate()
|
||||
@@ -572,15 +572,15 @@ var/global/list/RPD_recipes=list(
|
||||
|
||||
if(DISPOSALS_MODE) //Making disposals pipes
|
||||
if(is_anchored_dense_turf(A))
|
||||
user << "<span class='warning'>The [src]'s error light flickers; there's something in the way!</span>"
|
||||
to_chat(user, "<span class='warning'>The [src]'s error light flickers; there's something in the way!</span>")
|
||||
return
|
||||
user << "<span class='notice'>You start building a disposals pipe...</span>"
|
||||
to_chat(user, "<span class='notice'>You start building a disposals pipe...</span>")
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 4, target = A))
|
||||
var/obj/structure/disposalconstruct/C = new (A, queued_p_type ,queued_p_dir)
|
||||
|
||||
if(!C.can_place())
|
||||
user << "<span class='warning'>There's not enough room to build that here!</span>"
|
||||
to_chat(user, "<span class='warning'>There's not enough room to build that here!</span>")
|
||||
qdel(C)
|
||||
return
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ RSF
|
||||
|
||||
/obj/item/weapon/rsf/examine(mob/user)
|
||||
..()
|
||||
user << "<span class='notice'>It currently holds [matter]/30 fabrication-units.</span>"
|
||||
to_chat(user, "<span class='notice'>It currently holds [matter]/30 fabrication-units.</span>")
|
||||
|
||||
/obj/item/weapon/rsf/cyborg
|
||||
matter = 30
|
||||
@@ -27,12 +27,12 @@ RSF
|
||||
/obj/item/weapon/rsf/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/rcd_ammo))
|
||||
if((matter + 10) > 30)
|
||||
user << "The RSF can't hold any more matter."
|
||||
to_chat(user, "The RSF can't hold any more matter.")
|
||||
return
|
||||
qdel(W)
|
||||
matter += 10
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
user << "The RSF now holds [matter]/30 fabrication-units."
|
||||
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -41,22 +41,22 @@ RSF
|
||||
switch(mode)
|
||||
if(1)
|
||||
mode = 2
|
||||
user << "Changed dispensing mode to 'Drinking Glass'"
|
||||
to_chat(user, "Changed dispensing mode to 'Drinking Glass'")
|
||||
if(2)
|
||||
mode = 3
|
||||
user << "Changed dispensing mode to 'Paper'"
|
||||
to_chat(user, "Changed dispensing mode to 'Paper'")
|
||||
if(3)
|
||||
mode = 4
|
||||
user << "Changed dispensing mode to 'Pen'"
|
||||
to_chat(user, "Changed dispensing mode to 'Pen'")
|
||||
if(4)
|
||||
mode = 5
|
||||
user << "Changed dispensing mode to 'Dice Pack'"
|
||||
to_chat(user, "Changed dispensing mode to 'Dice Pack'")
|
||||
if(5)
|
||||
mode = 6
|
||||
user << "Changed dispensing mode to 'Cigarette'"
|
||||
to_chat(user, "Changed dispensing mode to 'Cigarette'")
|
||||
if(6)
|
||||
mode = 1
|
||||
user << "Changed dispensing mode to 'Dosh'"
|
||||
to_chat(user, "Changed dispensing mode to 'Dosh'")
|
||||
// Change mode
|
||||
|
||||
/obj/item/weapon/rsf/afterattack(atom/A, mob/user, proximity)
|
||||
@@ -66,39 +66,39 @@ RSF
|
||||
return
|
||||
|
||||
if(matter < 1)
|
||||
user << "<span class='warning'>\The [src] doesn't have enough matter left.</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] doesn't have enough matter left.</span>")
|
||||
return
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(!R.cell || R.cell.charge < 200)
|
||||
user << "<span class='warning'>You do not have enough power to use [src].</span>"
|
||||
to_chat(user, "<span class='warning'>You do not have enough power to use [src].</span>")
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(A)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
switch(mode)
|
||||
if(1)
|
||||
user << "Dispensing Dosh..."
|
||||
to_chat(user, "Dispensing Dosh...")
|
||||
new /obj/item/stack/spacecash/c10(T)
|
||||
use_matter(200, user)
|
||||
if(2)
|
||||
user << "Dispensing Drinking Glass..."
|
||||
to_chat(user, "Dispensing Drinking Glass...")
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass(T)
|
||||
use_matter(20, user)
|
||||
if(3)
|
||||
user << "Dispensing Paper Sheet..."
|
||||
to_chat(user, "Dispensing Paper Sheet...")
|
||||
new /obj/item/weapon/paper(T)
|
||||
use_matter(10, user)
|
||||
if(4)
|
||||
user << "Dispensing Pen..."
|
||||
to_chat(user, "Dispensing Pen...")
|
||||
new /obj/item/weapon/pen(T)
|
||||
use_matter(50, user)
|
||||
if(5)
|
||||
user << "Dispensing Dice Pack..."
|
||||
to_chat(user, "Dispensing Dice Pack...")
|
||||
new /obj/item/weapon/storage/pill_bottle/dice(T)
|
||||
use_matter(200, user)
|
||||
if(6)
|
||||
user << "Dispensing Cigarette..."
|
||||
to_chat(user, "Dispensing Cigarette...")
|
||||
new /obj/item/clothing/mask/cigarette(T)
|
||||
use_matter(10, user)
|
||||
|
||||
@@ -108,7 +108,7 @@ RSF
|
||||
R.cell.charge -= charge
|
||||
else
|
||||
matter--
|
||||
user << "The RSF now holds [matter]/30 fabrication-units."
|
||||
to_chat(user, "The RSF now holds [matter]/30 fabrication-units.")
|
||||
|
||||
/obj/item/weapon/cookiesynth
|
||||
name = "Cookie Synthesizer"
|
||||
@@ -124,7 +124,7 @@ RSF
|
||||
|
||||
/obj/item/weapon/cookiesynth/examine(mob/user)
|
||||
..()
|
||||
user << "<span class='notice'>It currently holds [matter]/10 cookie-units.</span>"
|
||||
to_chat(user, "<span class='notice'>It currently holds [matter]/10 cookie-units.</span>")
|
||||
|
||||
/obj/item/weapon/cookiesynth/attackby()
|
||||
return
|
||||
@@ -132,9 +132,9 @@ RSF
|
||||
/obj/item/weapon/cookiesynth/emag_act(mob/user)
|
||||
emagged = !emagged
|
||||
if(emagged)
|
||||
user << "<span class='warning'>You short out the [src]'s reagent safety checker!</span>"
|
||||
to_chat(user, "<span class='warning'>You short out the [src]'s reagent safety checker!</span>")
|
||||
else
|
||||
user << "<span class='warning'>You reset the [src]'s reagent safety checker!</span>"
|
||||
to_chat(user, "<span class='warning'>You reset the [src]'s reagent safety checker!</span>")
|
||||
toxin = 0
|
||||
|
||||
/obj/item/weapon/cookiesynth/attack_self(mob/user)
|
||||
@@ -143,13 +143,13 @@ RSF
|
||||
P = user
|
||||
if(emagged&&!toxin)
|
||||
toxin = 1
|
||||
user << "Cookie Synthesizer Hacked"
|
||||
to_chat(user, "Cookie Synthesizer Hacked")
|
||||
else if(P.emagged&&!toxin)
|
||||
toxin = 1
|
||||
user << "Cookie Synthesizer Hacked"
|
||||
to_chat(user, "Cookie Synthesizer Hacked")
|
||||
else
|
||||
toxin = 0
|
||||
user << "Cookie Synthesizer Reset"
|
||||
to_chat(user, "Cookie Synthesizer Reset")
|
||||
|
||||
/obj/item/weapon/cookiesynth/process()
|
||||
if(matter < 10)
|
||||
@@ -163,16 +163,16 @@ RSF
|
||||
if (!(istype(A, /obj/structure/table) || isfloorturf(A)))
|
||||
return
|
||||
if(matter < 1)
|
||||
user << "<span class='warning'>The [src] doesn't have enough matter left. Wait for it to recharge!</span>"
|
||||
to_chat(user, "<span class='warning'>The [src] doesn't have enough matter left. Wait for it to recharge!</span>")
|
||||
return
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(!R.cell || R.cell.charge < 400)
|
||||
user << "<span class='warning'>You do not have enough power to use [src].</span>"
|
||||
to_chat(user, "<span class='warning'>You do not have enough power to use [src].</span>")
|
||||
return
|
||||
var/turf/T = get_turf(A)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
user << "Fabricating Cookie.."
|
||||
to_chat(user, "Fabricating Cookie..")
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/cookie/S = new /obj/item/weapon/reagent_containers/food/snacks/cookie(T)
|
||||
if(toxin)
|
||||
S.reagents.add_reagent("chloralhydrate2", 10)
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
//because you're expecting user input.
|
||||
/obj/item/weapon/airlock_painter/proc/can_use(mob/user)
|
||||
if(!ink)
|
||||
user << "<span class='notice'>There is no toner cartridge installed in [src]!</span>"
|
||||
to_chat(user, "<span class='notice'>There is no toner cartridge installed in [src]!</span>")
|
||||
return 0
|
||||
else if(ink.charges < 1)
|
||||
user << "<span class='notice'>[src] is out of ink!</span>"
|
||||
to_chat(user, "<span class='notice'>[src] is out of ink!</span>")
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
@@ -92,7 +92,7 @@
|
||||
/obj/item/weapon/airlock_painter/examine(mob/user)
|
||||
..()
|
||||
if(!ink)
|
||||
user << "<span class='notice'>It doesn't have a toner cartridge installed.</span>"
|
||||
to_chat(user, "<span class='notice'>It doesn't have a toner cartridge installed.</span>")
|
||||
return
|
||||
var/ink_level = "high"
|
||||
if(ink.charges < 1)
|
||||
@@ -101,17 +101,17 @@
|
||||
ink_level = "low"
|
||||
else if((ink.charges/ink.max_charges) > 1) //Over 100% (admin var edit)
|
||||
ink_level = "dangerously high"
|
||||
user << "<span class='notice'>Its ink levels look [ink_level].</span>"
|
||||
to_chat(user, "<span class='notice'>Its ink levels look [ink_level].</span>")
|
||||
|
||||
|
||||
/obj/item/weapon/airlock_painter/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/device/toner))
|
||||
if(ink)
|
||||
user << "<span class='notice'>[src] already contains \a [ink].</span>"
|
||||
to_chat(user, "<span class='notice'>[src] already contains \a [ink].</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
user << "<span class='notice'>You install [W] into [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You install [W] into [src].</span>")
|
||||
ink = W
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
else
|
||||
@@ -122,5 +122,5 @@
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
ink.loc = user.loc
|
||||
user.put_in_hands(ink)
|
||||
user << "<span class='notice'>You remove [ink] from [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You remove [ink] from [src].</span>")
|
||||
ink = null
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
/obj/item/weapon/card/id/examine(mob/user)
|
||||
..()
|
||||
if(mining_points)
|
||||
user << "There's [mining_points] mining equipment redemption point\s loaded onto this card."
|
||||
to_chat(user, "There's [mining_points] mining equipment redemption point\s loaded onto this card.")
|
||||
|
||||
/obj/item/weapon/card/id/GetAccess()
|
||||
return access
|
||||
@@ -150,14 +150,14 @@ update_label("John Doe", "Clowny")
|
||||
src.access |= I.access
|
||||
if(isliving(user) && user.mind)
|
||||
if(user.mind.special_role)
|
||||
usr << "<span class='notice'>The card's microscanners activate as you pass it over the ID, copying its access.</span>"
|
||||
to_chat(usr, "<span class='notice'>The card's microscanners activate as you pass it over the ID, copying its access.</span>")
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/attack_self(mob/user)
|
||||
if(isliving(user) && user.mind)
|
||||
if(user.mind.special_role || anyone)
|
||||
if(alert(user, "Action", "Agent ID", "Show", "Forge") == "Forge")
|
||||
var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", registered_name ? registered_name : (ishuman(user) ? user.real_name : user.name))as text | null),1,26)
|
||||
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/new_player/prefrences.dm
|
||||
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/dead/new_player/prefrences.dm
|
||||
if (t)
|
||||
alert("Invalid name.")
|
||||
return
|
||||
@@ -169,7 +169,7 @@ update_label("John Doe", "Clowny")
|
||||
return
|
||||
assignment = u
|
||||
update_label()
|
||||
user << "<span class='notice'>You successfully forge the ID card.</span>"
|
||||
to_chat(user, "<span class='notice'>You successfully forge the ID card.</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -249,7 +249,7 @@ update_label("John Doe", "Clowny")
|
||||
var/points = 0
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/attack_self(mob/user)
|
||||
usr << "<span class='notice'>You have accumulated [points] out of the [goal] points you need for freedom.</span>"
|
||||
to_chat(usr, "<span class='notice'>You have accumulated [points] out of the [goal] points you need for freedom.</span>")
|
||||
|
||||
/obj/item/weapon/card/id/prisoner/one
|
||||
name = "Prisoner #13-001"
|
||||
|
||||
@@ -82,14 +82,14 @@
|
||||
var/mob/living/user = src.loc
|
||||
if(F.gun)
|
||||
if(isliving(user) && F.captured)
|
||||
user << "<span class='alert'><b>FAIL: <i>[F.captured]</i> already has an existing connection.</b></span>"
|
||||
to_chat(user, "<span class='alert'><b>FAIL: <i>[F.captured]</i> already has an existing connection.</b></span>")
|
||||
src.field_disconnect(F)
|
||||
else
|
||||
startpos = get_turf(src)
|
||||
field = F
|
||||
F.gun = src
|
||||
if(isliving(user) && F.captured)
|
||||
user << "<span class='notice'>Connection established with target: <b>[F.captured]</b></span>"
|
||||
to_chat(user, "<span class='notice'>Connection established with target: <b>[F.captured]</b></span>")
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/chrono_gun/proc/field_disconnect(obj/effect/chrono_field/F)
|
||||
@@ -98,7 +98,7 @@
|
||||
if(F.gun == src)
|
||||
F.gun = null
|
||||
if(isliving(user) && F.captured)
|
||||
user << "<span class='alert'>Disconnected from target: <b>[F.captured]</b></span>"
|
||||
to_chat(user, "<span class='alert'>Disconnected from target: <b>[F.captured]</b></span>")
|
||||
field = null
|
||||
startpos = null
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
AM.loc = loc
|
||||
qdel(src)
|
||||
else if(tickstokill <= 0)
|
||||
captured << "<span class='boldnotice'>As the last essence of your being is erased from time, you begin to re-experience your most enjoyable memory. You feel happy...</span>"
|
||||
to_chat(captured, "<span class='boldnotice'>As the last essence of your being is erased from time, you begin to re-experience your most enjoyable memory. You feel happy...</span>")
|
||||
var/mob/dead/observer/ghost = captured.ghostize(1)
|
||||
if(captured.mind)
|
||||
if(ghost)
|
||||
|
||||
@@ -77,7 +77,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M)
|
||||
if(lit && cig && user.a_intent == INTENT_HELP)
|
||||
if(cig.lit)
|
||||
user << "<span class='notice'>The [cig.name] is already lit.</span>"
|
||||
to_chat(user, "<span class='notice'>The [cig.name] is already lit.</span>")
|
||||
if(M == user)
|
||||
cig.attackby(src, user)
|
||||
else
|
||||
@@ -139,14 +139,13 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(!proximity || lit) //can't dip if cigarette is lit (it will heat the reagents in the glass instead)
|
||||
return
|
||||
if(istype(glass)) //you can dip cigarettes into beakers
|
||||
var/transfered = glass.reagents.trans_to(src, chem_volume)
|
||||
if(transfered) //if reagents were transfered, show the message
|
||||
user << "<span class='notice'>You dip \the [src] into \the [glass].</span>"
|
||||
if(glass.reagents.trans_to(src, chem_volume)) //if reagents were transfered, show the message
|
||||
to_chat(user, "<span class='notice'>You dip \the [src] into \the [glass].</span>")
|
||||
else //if not, either the beaker was empty, or the cigarette was full
|
||||
if(!glass.reagents.total_volume)
|
||||
user << "<span class='notice'>[glass] is empty.</span>"
|
||||
to_chat(user, "<span class='notice'>[glass] is empty.</span>")
|
||||
else
|
||||
user << "<span class='notice'>[src] is full.</span>"
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
|
||||
|
||||
/obj/item/clothing/mask/cigarette/proc/light(flavor_text = null)
|
||||
@@ -196,7 +195,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(prob(15)) // so it's not an instarape in case of acid
|
||||
var/fraction = min(REAGENTS_METABOLISM/reagents.total_volume, 1)
|
||||
reagents.reaction(C, INGEST, fraction)
|
||||
reagents.trans_to(C, REAGENTS_METABOLISM)
|
||||
if(!reagents.trans_to(C, REAGENTS_METABOLISM))
|
||||
reagents.remove_any(REAGENTS_METABOLISM)
|
||||
return
|
||||
reagents.remove_any(REAGENTS_METABOLISM)
|
||||
|
||||
@@ -210,7 +210,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(smoketime < 1)
|
||||
new type_butt(location)
|
||||
if(ismob(loc))
|
||||
M << "<span class='notice'>Your [name] goes out.</span>"
|
||||
to_chat(M, "<span class='notice'>Your [name] goes out.</span>")
|
||||
qdel(src)
|
||||
return
|
||||
open_flame()
|
||||
@@ -231,7 +231,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M)
|
||||
if(lit && cig && user.a_intent == INTENT_HELP)
|
||||
if(cig.lit)
|
||||
user << "<span class='notice'>The [cig.name] is already lit.</span>"
|
||||
to_chat(user, "<span class='notice'>The [cig.name] is already lit.</span>")
|
||||
if(M == user)
|
||||
cig.attackby(src, user)
|
||||
else
|
||||
@@ -355,7 +355,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
new /obj/effect/decal/cleanable/ash(location)
|
||||
if(ismob(loc))
|
||||
var/mob/living/M = loc
|
||||
M << "<span class='notice'>Your [name] goes out.</span>"
|
||||
to_chat(M, "<span class='notice'>Your [name] goes out.</span>")
|
||||
lit = 0
|
||||
icon_state = icon_off
|
||||
item_state = icon_off
|
||||
@@ -374,7 +374,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/grown/G = O
|
||||
if(!packeditem)
|
||||
if(G.dry == 1)
|
||||
user << "<span class='notice'>You stuff [O] into [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You stuff [O] into [src].</span>")
|
||||
smoketime = 400
|
||||
packeditem = 1
|
||||
name = "[O.name]-packed [initial(name)]"
|
||||
@@ -382,16 +382,16 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
O.reagents.trans_to(src, O.reagents.total_volume)
|
||||
qdel(O)
|
||||
else
|
||||
user << "<span class='warning'>It has to be dried first!</span>"
|
||||
to_chat(user, "<span class='warning'>It has to be dried first!</span>")
|
||||
else
|
||||
user << "<span class='warning'>It is already packed!</span>"
|
||||
to_chat(user, "<span class='warning'>It is already packed!</span>")
|
||||
else
|
||||
var/lighting_text = O.ignition_effect(src,user)
|
||||
if(lighting_text)
|
||||
if(smoketime > 0)
|
||||
light(lighting_text)
|
||||
else
|
||||
user << "<span class='warning'>There is nothing to smoke!</span>"
|
||||
to_chat(user, "<span class='warning'>There is nothing to smoke!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -405,7 +405,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
if(!lit && smoketime > 0)
|
||||
user << "<span class='notice'>You empty [src] onto [location].</span>"
|
||||
to_chat(user, "<span class='notice'>You empty [src] onto [location].</span>")
|
||||
new /obj/effect/decal/cleanable/ash(location)
|
||||
packeditem = 0
|
||||
smoketime = 0
|
||||
@@ -489,7 +489,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
user.apply_damage(5, BURN, hitzone)
|
||||
user.visible_message("<span class='warning'>After a few attempts, [user] manages to light [src] - however, [user.p_they()] burn their finger in the process.</span>", "<span class='warning'>You burn yourself while lighting the lighter!</span>")
|
||||
|
||||
user.AddLuminosity(1)
|
||||
set_light(1)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
lit = 0
|
||||
@@ -501,7 +501,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what [user.p_theyre()] doing. Wow.", "<span class='notice'>You quietly shut off [src] without even looking at what you're doing. Wow.</span>")
|
||||
else
|
||||
user.visible_message("[user] quietly shuts off [src].", "<span class='notice'>You quietly shut off [src].")
|
||||
user.AddLuminosity(-1)
|
||||
set_light(0)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
else
|
||||
. = ..()
|
||||
@@ -513,7 +513,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M)
|
||||
if(lit && cig && user.a_intent == INTENT_HELP)
|
||||
if(cig.lit)
|
||||
user << "<span class='notice'>The [cig.name] is already lit.</span>"
|
||||
to_chat(user, "<span class='notice'>The [cig.name] is already lit.</span>")
|
||||
if(M == user)
|
||||
cig.attackby(src, user)
|
||||
else
|
||||
@@ -527,19 +527,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
/obj/item/weapon/lighter/process()
|
||||
open_flame()
|
||||
|
||||
/obj/item/weapon/lighter/pickup(mob/user)
|
||||
..()
|
||||
if(lit)
|
||||
SetLuminosity(0)
|
||||
user.AddLuminosity(1)
|
||||
|
||||
/obj/item/weapon/lighter/dropped(mob/user)
|
||||
..()
|
||||
if(lit)
|
||||
if(user)
|
||||
user.AddLuminosity(-1)
|
||||
SetLuminosity(1)
|
||||
|
||||
/obj/item/weapon/lighter/is_hot()
|
||||
return lit * heat
|
||||
|
||||
@@ -565,10 +552,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
qdel(target)
|
||||
qdel(src)
|
||||
user.put_in_active_hand(R)
|
||||
user << "<span class='notice'>You roll the [target.name] into a rolling paper.</span>"
|
||||
to_chat(user, "<span class='notice'>You roll the [target.name] into a rolling paper.</span>")
|
||||
R.desc = "Dried [target.name] rolled up in a thin piece of paper."
|
||||
else
|
||||
user << "<span class='warning'>You need to dry this first!</span>"
|
||||
to_chat(user, "<span class='warning'>You need to dry this first!</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -608,23 +595,23 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(reagents.total_volume < chem_volume)
|
||||
if(O.reagents.total_volume > 0)
|
||||
O.reagents.trans_to(src,25)
|
||||
user << "<span class='notice'>You add the contents of [O] to the [src]</span>"
|
||||
to_chat(user, "<span class='notice'>You add the contents of [O] to the [src]</span>")
|
||||
else
|
||||
user << "<span class='warning'>The [O] is empty!</span>"
|
||||
to_chat(user, "<span class='warning'>The [O] is empty!</span>")
|
||||
else
|
||||
user << "<span class='warning'>[src] can't hold anymore reagents!</span>"
|
||||
to_chat(user, "<span class='warning'>[src] can't hold anymore reagents!</span>")
|
||||
|
||||
if(istype(O, /obj/item/weapon/screwdriver))
|
||||
if(!screw)
|
||||
screw = 1
|
||||
user << "<span class='notice'>You open the cap on the [src]</span>"
|
||||
to_chat(user, "<span class='notice'>You open the cap on the [src]</span>")
|
||||
if(super)
|
||||
add_overlay(image(icon, "vapeopen_med"))
|
||||
else
|
||||
add_overlay(image(icon, "vapeopen_low"))
|
||||
else
|
||||
screw = 0
|
||||
user << "<span class='notice'>You close the cap on the [src]</span>"
|
||||
to_chat(user, "<span class='notice'>You close the cap on the [src]</span>")
|
||||
cut_overlays()
|
||||
|
||||
if(istype(O, /obj/item/device/multitool))
|
||||
@@ -632,16 +619,16 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(!super)
|
||||
cut_overlays()
|
||||
super = 1
|
||||
user << "<span class='notice'>You increase the voltage in the [src]</span>"
|
||||
to_chat(user, "<span class='notice'>You increase the voltage in the [src]</span>")
|
||||
add_overlay(image(icon, "vapeopen_med"))
|
||||
else
|
||||
cut_overlays()
|
||||
super = 0
|
||||
user << "<span class='notice'>You decrease the voltage in the [src]</span>"
|
||||
to_chat(user, "<span class='notice'>You decrease the voltage in the [src]</span>")
|
||||
add_overlay(image(icon, "vapeopen_low"))
|
||||
|
||||
if(screw && emagged)
|
||||
user << "<span class='notice'>The [name] can't be modified!</span>"
|
||||
to_chat(user, "<span class='notice'>The [name] can't be modified!</span>")
|
||||
|
||||
|
||||
/obj/item/clothing/mask/vape/emag_act(mob/user)// I WON'T REGRET WRITTING THIS, SURLY.
|
||||
@@ -650,30 +637,30 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
cut_overlays()
|
||||
emagged = 1
|
||||
super = 0
|
||||
user << "<span class='warning'>You maximize the voltage in the [src]</span>"
|
||||
to_chat(user, "<span class='warning'>You maximize the voltage in the [src]</span>")
|
||||
add_overlay(image(icon, "vapeopen_high"))
|
||||
var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread //for effect
|
||||
sp.set_up(5, 1, src)
|
||||
sp.start()
|
||||
else
|
||||
user << "<span class='warning'>The [name] is already emagged!</span>"
|
||||
to_chat(user, "<span class='warning'>The [name] is already emagged!</span>")
|
||||
else
|
||||
user << "<span class='notice'>You need to open the cap to do that</span>"
|
||||
to_chat(user, "<span class='notice'>You need to open the cap to do that</span>")
|
||||
|
||||
/obj/item/clothing/mask/vape/attack_self(mob/user)
|
||||
if(reagents.total_volume > 0)
|
||||
user << "<span class='notice'>you empty [src] of all reagents.</span>"
|
||||
to_chat(user, "<span class='notice'>you empty [src] of all reagents.</span>")
|
||||
reagents.clear_reagents()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/vape/equipped(mob/user, slot)
|
||||
if(slot == slot_wear_mask)
|
||||
if(!screw)
|
||||
user << "<span class='notice'>You start puffing on the vape.</span>"
|
||||
to_chat(user, "<span class='notice'>You start puffing on the vape.</span>")
|
||||
reagents.set_reacting(TRUE)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else //it will not start if the vape is opened.
|
||||
user << "<span class='warning'>You need to close the cap first!</span>"
|
||||
to_chat(user, "<span class='warning'>You need to close the cap first!</span>")
|
||||
|
||||
/obj/item/clothing/mask/vape/dropped(mob/user)
|
||||
var/mob/living/carbon/C = user
|
||||
@@ -688,7 +675,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if (src == C.wear_mask) // if it's in the human/monkey mouth, transfer reagents to the mob
|
||||
var/fraction = min(REAGENTS_METABOLISM/reagents.total_volume, 1) //this will react instantly, making them a little more dangerous than cigarettes
|
||||
reagents.reaction(C, INGEST, fraction)
|
||||
reagents.trans_to(C, REAGENTS_METABOLISM)
|
||||
if(!reagents.trans_to(C, REAGENTS_METABOLISM))
|
||||
reagents.remove_any(REAGENTS_METABOLISM)
|
||||
if(reagents.get_reagent_amount("welding_fuel"))
|
||||
//HOT STUFF
|
||||
C.fire_stacks = 2
|
||||
@@ -712,7 +700,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
|
||||
if(!reagents.total_volume)
|
||||
if(ismob(loc))
|
||||
M << "<span class='notice'>The [name] is empty!</span>"
|
||||
to_chat(M, "<span class='notice'>The [name] is empty!</span>")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
//it's reusable so it won't unequip when empty
|
||||
return
|
||||
@@ -737,7 +725,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread
|
||||
sp.set_up(5, 1, src)
|
||||
sp.start()
|
||||
M << "<span class='userdanger'>The [name] suddenly explodes in your mouth!</span>"
|
||||
to_chat(M, "<span class='userdanger'>The [name] suddenly explodes in your mouth!</span>")
|
||||
|
||||
if(reagents && reagents.total_volume)
|
||||
hand_reagents()
|
||||
|
||||
@@ -58,11 +58,11 @@
|
||||
//I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing.
|
||||
//So this is a workaround. This also makes more sense from an IC standpoint. ~Carn
|
||||
if(user.client && (target in user.client.screen))
|
||||
user << "<span class='warning'>You need to take that [target.name] off before cleaning it!</span>"
|
||||
to_chat(user, "<span class='warning'>You need to take that [target.name] off before cleaning it!</span>")
|
||||
else if(istype(target,/obj/effect/decal/cleanable))
|
||||
user.visible_message("[user] begins to scrub \the [target.name] out with [src].", "<span class='warning'>You begin to scrub \the [target.name] out with [src]...</span>")
|
||||
if(do_after(user, src.cleanspeed, target = target))
|
||||
user << "<span class='notice'>You scrub \the [target.name] out.</span>"
|
||||
to_chat(user, "<span class='notice'>You scrub \the [target.name] out.</span>")
|
||||
qdel(target)
|
||||
else if(ishuman(target) && user.zone_selected == "mouth")
|
||||
var/mob/living/carbon/human/H = user
|
||||
@@ -73,13 +73,13 @@
|
||||
else if(istype(target, /obj/structure/window))
|
||||
user.visible_message("[user] begins to clean \the [target.name] with [src]...", "<span class='notice'>You begin to clean \the [target.name] with [src]...</span>")
|
||||
if(do_after(user, src.cleanspeed, target = target))
|
||||
user << "<span class='notice'>You clean \the [target.name].</span>"
|
||||
to_chat(user, "<span class='notice'>You clean \the [target.name].</span>")
|
||||
target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
|
||||
target.SetOpacity(initial(target.opacity))
|
||||
target.set_opacity(initial(target.opacity))
|
||||
else
|
||||
user.visible_message("[user] begins to clean \the [target.name] with [src]...", "<span class='notice'>You begin to clean \the [target.name] with [src]...</span>")
|
||||
if(do_after(user, src.cleanspeed, target = target))
|
||||
user << "<span class='notice'>You clean \the [target.name].</span>"
|
||||
to_chat(user, "<span class='notice'>You clean \the [target.name].</span>")
|
||||
var/obj/effect/decal/cleanable/C = locate() in target
|
||||
qdel(C)
|
||||
target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
/obj/item/weapon/lipstick/attack_self(mob/user)
|
||||
cut_overlays()
|
||||
user << "<span class='notice'>You twist \the [src] [open ? "closed" : "open"].</span>"
|
||||
to_chat(user, "<span class='notice'>You twist \the [src] [open ? "closed" : "open"].</span>")
|
||||
open = !open
|
||||
if(open)
|
||||
var/image/colored = image("icon"='icons/obj/items.dmi', "icon_state"="lipstick_uncap_color")
|
||||
@@ -55,10 +55,10 @@
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.is_mouth_covered())
|
||||
user << "<span class='warning'>Remove [ H == user ? "your" : "their" ] mask!</span>"
|
||||
to_chat(user, "<span class='warning'>Remove [ H == user ? "your" : "their" ] mask!</span>")
|
||||
return
|
||||
if(H.lip_style) //if they already have lipstick on
|
||||
user << "<span class='warning'>You need to wipe off the old lipstick first!</span>"
|
||||
to_chat(user, "<span class='warning'>You need to wipe off the old lipstick first!</span>")
|
||||
return
|
||||
if(H == user)
|
||||
user.visible_message("<span class='notice'>[user] does their lips with \the [src].</span>", \
|
||||
@@ -76,7 +76,7 @@
|
||||
H.lip_color = colour
|
||||
H.update_body()
|
||||
else
|
||||
user << "<span class='warning'>Where are the lips on that?</span>"
|
||||
to_chat(user, "<span class='warning'>Where are the lips on that?</span>")
|
||||
|
||||
//you can wipe off lipstick with paper!
|
||||
/obj/item/weapon/paper/attack(mob/M, mob/user)
|
||||
@@ -87,7 +87,7 @@
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H == user)
|
||||
user << "<span class='notice'>You wipe off the lipstick with [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You wipe off the lipstick with [src].</span>")
|
||||
H.lip_style = null
|
||||
H.update_body()
|
||||
else
|
||||
@@ -127,13 +127,13 @@
|
||||
var/location = user.zone_selected
|
||||
if(location == "mouth")
|
||||
if(!(FACEHAIR in H.dna.species.species_traits))
|
||||
user << "<span class='warning'>There is no facial hair to shave!</span>"
|
||||
to_chat(user, "<span class='warning'>There is no facial hair to shave!</span>")
|
||||
return
|
||||
if(!get_location_accessible(H, location))
|
||||
user << "<span class='warning'>The mask is in the way!</span>"
|
||||
to_chat(user, "<span class='warning'>The mask is in the way!</span>")
|
||||
return
|
||||
if(H.facial_hair_style == "Shaved")
|
||||
user << "<span class='warning'>Already clean-shaven!</span>"
|
||||
to_chat(user, "<span class='warning'>Already clean-shaven!</span>")
|
||||
return
|
||||
|
||||
if(H == user) //shaving yourself
|
||||
@@ -155,13 +155,13 @@
|
||||
|
||||
else if(location == "head")
|
||||
if(!(HAIR in H.dna.species.species_traits))
|
||||
user << "<span class='warning'>There is no hair to shave!</span>"
|
||||
to_chat(user, "<span class='warning'>There is no hair to shave!</span>")
|
||||
return
|
||||
if(!get_location_accessible(H, location))
|
||||
user << "<span class='warning'>The headgear is in the way!</span>"
|
||||
to_chat(user, "<span class='warning'>The headgear is in the way!</span>")
|
||||
return
|
||||
if(H.hair_style == "Bald" || H.hair_style == "Balding Hair" || H.hair_style == "Skinhead")
|
||||
user << "<span class='warning'>There is not enough hair left to shave!</span>"
|
||||
to_chat(user, "<span class='warning'>There is not enough hair left to shave!</span>")
|
||||
return
|
||||
|
||||
if(H == user) //shaving yourself
|
||||
|
||||
@@ -82,13 +82,13 @@
|
||||
if(user.get_item_by_slot(slot_back) == src)
|
||||
ui_action_click()
|
||||
else
|
||||
user << "<span class='warning'>Put the defibrillator on your back first!</span>"
|
||||
to_chat(user, "<span class='warning'>Put the defibrillator on your back first!</span>")
|
||||
|
||||
else if(slot_flags == SLOT_BELT)
|
||||
if(user.get_item_by_slot(slot_belt) == src)
|
||||
ui_action_click()
|
||||
else
|
||||
user << "<span class='warning'>Strap the defibrillator's belt on first!</span>"
|
||||
to_chat(user, "<span class='warning'>Strap the defibrillator's belt on first!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -106,15 +106,15 @@
|
||||
else if(istype(W, /obj/item/weapon/stock_parts/cell))
|
||||
var/obj/item/weapon/stock_parts/cell/C = W
|
||||
if(bcell)
|
||||
user << "<span class='notice'>[src] already has a cell.</span>"
|
||||
to_chat(user, "<span class='notice'>[src] already has a cell.</span>")
|
||||
else
|
||||
if(C.maxcharge < paddles.revivecost)
|
||||
user << "<span class='notice'>[src] requires a higher capacity cell.</span>"
|
||||
to_chat(user, "<span class='notice'>[src] requires a higher capacity cell.</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
bcell = W
|
||||
user << "<span class='notice'>You install a cell in [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
|
||||
update_icon()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
@@ -122,7 +122,7 @@
|
||||
bcell.updateicon()
|
||||
bcell.loc = get_turf(src.loc)
|
||||
bcell = null
|
||||
user << "<span class='notice'>You remove the cell from [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
@@ -130,10 +130,10 @@
|
||||
/obj/item/weapon/defibrillator/emag_act(mob/user)
|
||||
if(safety)
|
||||
safety = 0
|
||||
user << "<span class='warning'>You silently disable [src]'s safety protocols with the cryptographic sequencer."
|
||||
to_chat(user, "<span class='warning'>You silently disable [src]'s safety protocols with the cryptographic sequencer.")
|
||||
else
|
||||
safety = 1
|
||||
user << "<span class='notice'>You silently enable [src]'s safety protocols with the cryptographic sequencer."
|
||||
to_chat(user, "<span class='notice'>You silently enable [src]'s safety protocols with the cryptographic sequencer.")
|
||||
|
||||
/obj/item/weapon/defibrillator/emp_act(severity)
|
||||
if(bcell)
|
||||
@@ -159,7 +159,7 @@
|
||||
//Detach the paddles into the user's hands
|
||||
if(!usr.put_in_hands(paddles))
|
||||
on = 0
|
||||
user << "<span class='warning'>You need a free hand to hold the paddles!</span>"
|
||||
to_chat(user, "<span class='warning'>You need a free hand to hold the paddles!</span>")
|
||||
update_icon()
|
||||
return
|
||||
paddles.loc = user
|
||||
@@ -323,7 +323,7 @@
|
||||
var/obj/item/weapon/twohanded/offhand/O = user.get_inactive_held_item()
|
||||
if(istype(O))
|
||||
O.unwield()
|
||||
user << "<span class='notice'>The paddles snap back into the main unit.</span>"
|
||||
to_chat(user, "<span class='notice'>The paddles snap back into the main unit.</span>")
|
||||
defib.on = 0
|
||||
loc = defib
|
||||
defib.update_icon()
|
||||
@@ -348,15 +348,15 @@
|
||||
return
|
||||
if(!wielded)
|
||||
if(iscyborg(user))
|
||||
user << "<span class='warning'>You must activate the paddles in your active module before you can use them on someone!</span>"
|
||||
to_chat(user, "<span class='warning'>You must activate the paddles in your active module before you can use them on someone!</span>")
|
||||
else
|
||||
user << "<span class='warning'>You need to wield the paddles in both hands before you can use them on someone!</span>"
|
||||
to_chat(user, "<span class='warning'>You need to wield the paddles in both hands before you can use them on someone!</span>")
|
||||
return
|
||||
if(cooldown)
|
||||
if(req_defib)
|
||||
user << "<span class='warning'>[defib] is recharging!</span>"
|
||||
to_chat(user, "<span class='warning'>[defib] is recharging!</span>")
|
||||
else
|
||||
user << "<span class='warning'>[src] are recharging!</span>"
|
||||
to_chat(user, "<span class='warning'>[src] are recharging!</span>")
|
||||
return
|
||||
|
||||
if(user.a_intent == INTENT_DISARM)
|
||||
@@ -365,16 +365,15 @@
|
||||
|
||||
if(!ishuman(M))
|
||||
if(req_defib)
|
||||
user << "<span class='warning'>The instructions on [defib] don't mention how to revive that...</span>"
|
||||
to_chat(user, "<span class='warning'>The instructions on [defib] don't mention how to revive that...</span>")
|
||||
else
|
||||
user << "<span class='warning'>You aren't sure how to revive that...</span>"
|
||||
to_chat(user, "<span class='warning'>You aren't sure how to revive that...</span>")
|
||||
return
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
|
||||
if(user.zone_selected != "chest")
|
||||
user << "<span class='warning'>You need to target your patient's \
|
||||
chest with [src]!</span>"
|
||||
to_chat(user, "<span class='warning'>You need to target your patient's chest with [src]!</span>")
|
||||
return
|
||||
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
@@ -438,7 +437,7 @@
|
||||
update_icon()
|
||||
return
|
||||
if(H && H.stat == DEAD)
|
||||
user << "<span class='warning'>[H] is dead.</span>"
|
||||
to_chat(user, "<span class='warning'>[H] is dead.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
busy = 0
|
||||
update_icon()
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
if(istype(H) && !H.shoes)
|
||||
if(PIERCEIMMUNE in H.dna.species.species_traits)
|
||||
return 0
|
||||
H << "<span class='userdanger'>You step on the D4!</span>"
|
||||
to_chat(H, "<span class='userdanger'>You step on the D4!</span>")
|
||||
H.apply_damage(4,BRUTE,(pick("l_leg", "r_leg")))
|
||||
H.Weaken(3)
|
||||
|
||||
|
||||
@@ -51,15 +51,15 @@
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
log_attack(log_msg)
|
||||
else
|
||||
user << "<span class='notice'>It appears that [M] does not have compatible DNA.</span>"
|
||||
to_chat(user, "<span class='notice'>It appears that [M] does not have compatible DNA.</span>")
|
||||
return
|
||||
|
||||
/obj/item/weapon/dnainjector/attack(mob/target, mob/user)
|
||||
if(!user.IsAdvancedToolUser())
|
||||
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
if(used)
|
||||
user << "<span class='warning'>This injector is used up!</span>"
|
||||
to_chat(user, "<span class='warning'>This injector is used up!</span>")
|
||||
return
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/humantarget = target
|
||||
@@ -75,7 +75,7 @@
|
||||
"<span class='userdanger'>[user] injects [target] with the syringe with [src]!")
|
||||
|
||||
else
|
||||
user << "<span class='notice'>You inject yourself with [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You inject yourself with [src].</span>")
|
||||
|
||||
add_logs(user, target, "injected", src)
|
||||
|
||||
@@ -310,7 +310,7 @@
|
||||
|
||||
if(M.has_dna() && !(M.disabilities & NOCLONE))
|
||||
if(M.stat == DEAD) //prevents dead people from having their DNA changed
|
||||
user << "<span class='notice'>You can't modify [M]'s DNA while [M.p_theyre()] dead.</span>"
|
||||
to_chat(user, "<span class='notice'>You can't modify [M]'s DNA while [M.p_theyre()] dead.</span>")
|
||||
return
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
@@ -353,7 +353,7 @@
|
||||
M.dna.temporary_mutations[UI_CHANGED] = endtime
|
||||
log_attack(log_msg)
|
||||
else
|
||||
user << "<span class='notice'>It appears that [M] does not have compatible DNA.</span>"
|
||||
to_chat(user, "<span class='notice'>It appears that [M] does not have compatible DNA.</span>")
|
||||
return
|
||||
|
||||
/obj/item/weapon/dnainjector/timed/hulk
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
/obj/item/weapon/c4/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
open_panel = !open_panel
|
||||
user << "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>"
|
||||
to_chat(user, "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>")
|
||||
else if(is_wire_tool(I))
|
||||
wires.interact(user)
|
||||
else
|
||||
@@ -63,7 +63,7 @@
|
||||
if(user.get_active_held_item() == src)
|
||||
newtime = Clamp(newtime, 10, 60000)
|
||||
timer = newtime
|
||||
user << "Timer set for [timer] seconds."
|
||||
to_chat(user, "Timer set for [timer] seconds.")
|
||||
|
||||
/obj/item/weapon/c4/afterattack(atom/movable/AM, mob/user, flag)
|
||||
if (!flag)
|
||||
@@ -79,7 +79,7 @@
|
||||
if(!S.locked) //Literal hacks, this works for lockboxes despite incorrect type casting, because they both share the locked var. But if its unlocked, place it inside, otherwise PLANTING C4!
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You start planting the bomb...</span>"
|
||||
to_chat(user, "<span class='notice'>You start planting the bomb...</span>")
|
||||
|
||||
if(do_after(user, 50, target = AM))
|
||||
if(!user.temporarilyRemoveItemFromInventory(src))
|
||||
@@ -93,7 +93,7 @@
|
||||
log_game("[key_name(user)] planted [name] on [target.name] at [COORD(target)] with [timer] second fuse")
|
||||
|
||||
target.add_overlay(image_overlay, 1)
|
||||
user << "<span class='notice'>You plant the bomb. Timer counting down from [timer].</span>"
|
||||
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [timer].</span>")
|
||||
addtimer(CALLBACK(src, .proc/explode), timer * 10)
|
||||
|
||||
/obj/item/weapon/c4/proc/explode()
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
safety = !safety
|
||||
src.icon_state = "[sprite_name][!safety]"
|
||||
src.desc = "The safety is [safety ? "on" : "off"]."
|
||||
user << "The safety is [safety ? "on" : "off"]."
|
||||
to_chat(user, "The safety is [safety ? "on" : "off"].")
|
||||
return
|
||||
|
||||
/obj/item/weapon/extinguisher/attack(mob/M, mob/user)
|
||||
@@ -67,27 +67,27 @@
|
||||
/obj/item/weapon/extinguisher/examine(mob/user)
|
||||
..()
|
||||
if(reagents.total_volume)
|
||||
user << "It contains [round(reagents.total_volume)] units."
|
||||
to_chat(user, "It contains [round(reagents.total_volume)] units.")
|
||||
else
|
||||
user << "It is empty."
|
||||
to_chat(user, "It is empty.")
|
||||
|
||||
/obj/item/weapon/extinguisher/proc/AttemptRefill(atom/target, mob/user)
|
||||
if(istype(target, /obj/structure/reagent_dispensers/watertank) && target.Adjacent(user))
|
||||
var/safety_save = safety
|
||||
safety = TRUE
|
||||
if(reagents.total_volume == reagents.maximum_volume)
|
||||
user << "<span class='warning'>\The [src] is already full!</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] is already full!</span>")
|
||||
safety = safety_save
|
||||
return 1
|
||||
var/obj/structure/reagent_dispensers/watertank/W = target
|
||||
var/transferred = W.reagents.trans_to(src, max_water)
|
||||
if(transferred > 0)
|
||||
user << "<span class='notice'>\The [src] has been refilled by [transferred] units.</span>"
|
||||
to_chat(user, "<span class='notice'>\The [src] has been refilled by [transferred] units.</span>")
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
for(var/datum/reagent/water/R in reagents.reagent_list)
|
||||
R.cooling_temperature = cooling_power
|
||||
else
|
||||
user << "<span class='warning'>\The [W] is empty!</span>"
|
||||
to_chat(user, "<span class='warning'>\The [W] is empty!</span>")
|
||||
safety = safety_save
|
||||
return 1
|
||||
else
|
||||
@@ -100,7 +100,7 @@
|
||||
return
|
||||
if (!safety)
|
||||
if (src.reagents.total_volume < 1)
|
||||
usr << "<span class='warning'>\The [src] is empty!</span>"
|
||||
to_chat(usr, "<span class='warning'>\The [src] is empty!</span>")
|
||||
return
|
||||
|
||||
if (world.time < src.last_use + 12)
|
||||
|
||||
@@ -61,15 +61,15 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/flamethrower/afterattack(atom/target, mob/user, flag)
|
||||
if(flag)
|
||||
return // too close
|
||||
if(flag)
|
||||
return // too close
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.dna.check_mutation(HULK))
|
||||
user << "<span class='warning'>Your meaty finger is much too large for the trigger guard!</span>"
|
||||
to_chat(user, "<span class='warning'>Your meaty finger is much too large for the trigger guard!</span>")
|
||||
return
|
||||
if(NOGUNS in H.dna.species.species_traits)
|
||||
user << "<span class='warning'>Your fingers don't fit in the trigger guard!</span>"
|
||||
to_chat(user, "<span class='warning'>Your fingers don't fit in the trigger guard!</span>")
|
||||
return
|
||||
if(user && user.get_active_held_item() == src) // Make sure our user is still holding us
|
||||
var/turf/target_turf = get_turf(target)
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && igniter && !lit)
|
||||
status = !status
|
||||
user << "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>"
|
||||
to_chat(user, "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>")
|
||||
update_icon()
|
||||
return
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
else if(istype(W,/obj/item/weapon/tank/internals/plasma))
|
||||
if(ptank)
|
||||
user << "<span class='notice'>There is already a plasma tank loaded in [src]!</span>"
|
||||
to_chat(user, "<span class='notice'>There is already a plasma tank loaded in [src]!</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
@@ -133,7 +133,7 @@
|
||||
return
|
||||
user.set_machine(src)
|
||||
if(!ptank)
|
||||
user << "<span class='notice'>Attach a plasma tank first!</span>"
|
||||
to_chat(user, "<span class='notice'>Attach a plasma tank first!</span>")
|
||||
return
|
||||
var/dat = text("<TT><B>Flamethrower (<A HREF='?src=\ref[src];light=1'>[lit ? "<font color='red'>Lit</font>" : "Unlit"]</a>)</B><BR>\n Tank Pressure: [ptank.air_contents.return_pressure()]<BR>\nAmount to throw: <A HREF='?src=\ref[src];amount=-100'>-</A> <A HREF='?src=\ref[src];amount=-10'>-</A> <A HREF='?src=\ref[src];amount=-1'>-</A> [throw_amount] <A HREF='?src=\ref[src];amount=1'>+</A> <A HREF='?src=\ref[src];amount=10'>+</A> <A HREF='?src=\ref[src];amount=100'>+</A><BR>\n<A HREF='?src=\ref[src];remove=1'>Remove plasmatank</A> - <A HREF='?src=\ref[src];close=1'>Close</A></TT>")
|
||||
user << browse(dat, "window=flamethrower;size=600x300")
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/obj/item/weapon/a_gift/attack_self(mob/M)
|
||||
if(M && M.mind && M.mind.special_role == "Santa")
|
||||
M << "<span class='warning'>You're supposed to be spreading gifts, not opening them yourself!</span>"
|
||||
to_chat(M, "<span class='warning'>You're supposed to be spreading gifts, not opening them yourself!</span>")
|
||||
return
|
||||
|
||||
var/gift_type_list = list(/obj/item/weapon/sord,
|
||||
@@ -43,8 +43,8 @@
|
||||
/obj/item/weapon/lipstick/random,
|
||||
/obj/item/weapon/grenade/smokebomb,
|
||||
/obj/item/weapon/grown/corncob,
|
||||
/obj/item/weapon/poster/contraband,
|
||||
/obj/item/weapon/poster/legit,
|
||||
/obj/item/weapon/poster/random_contraband,
|
||||
/obj/item/weapon/poster/random_official,
|
||||
/obj/item/weapon/book/manual/barman_recipes,
|
||||
/obj/item/weapon/book/manual/chef_recipes,
|
||||
/obj/item/weapon/bikehorn,
|
||||
@@ -78,4 +78,4 @@
|
||||
qdel(src)
|
||||
var/obj/item/I = new gift_type(M)
|
||||
M.put_in_hands(I)
|
||||
I.add_fingerprint(M)
|
||||
I.add_fingerprint(M)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
var/area/A = get_area(bombturf)
|
||||
message_admins("[key_name_admin(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).")
|
||||
user << "<span class='warning'>You prime the [name]! [det_time / 10] second\s!</span>"
|
||||
to_chat(user, "<span class='warning'>You prime the [name]! [det_time / 10] second\s!</span>")
|
||||
playsound(user.loc, 'sound/weapons/armbomb.ogg', 60, 1)
|
||||
active = 1
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
@@ -54,29 +54,29 @@
|
||||
if(stage == WIRED)
|
||||
if(beakers.len)
|
||||
stage_change(READY)
|
||||
user << "<span class='notice'>You lock the [initial(name)] assembly.</span>"
|
||||
to_chat(user, "<span class='notice'>You lock the [initial(name)] assembly.</span>")
|
||||
playsound(loc, I.usesound, 25, -3)
|
||||
else
|
||||
user << "<span class='warning'>You need to add at least one beaker before locking the [initial(name)] assembly!</span>"
|
||||
to_chat(user, "<span class='warning'>You need to add at least one beaker before locking the [initial(name)] assembly!</span>")
|
||||
else if(stage == READY && !nadeassembly)
|
||||
det_time = det_time == 50 ? 30 : 50 //toggle between 30 and 50
|
||||
user << "<span class='notice'>You modify the time delay. It's set for [det_time / 10] second\s.</span>"
|
||||
to_chat(user, "<span class='notice'>You modify the time delay. It's set for [det_time / 10] second\s.</span>")
|
||||
else if(stage == EMPTY)
|
||||
user << "<span class='warning'>You need to add an activation mechanism!</span>"
|
||||
to_chat(user, "<span class='warning'>You need to add an activation mechanism!</span>")
|
||||
|
||||
else if(stage == WIRED && is_type_in_list(I, allowed_containers))
|
||||
. = 1 //no afterattack
|
||||
if(beakers.len == 2)
|
||||
user << "<span class='warning'>[src] can not hold more containers!</span>"
|
||||
to_chat(user, "<span class='warning'>[src] can not hold more containers!</span>")
|
||||
return
|
||||
else
|
||||
if(I.reagents.total_volume)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
user << "<span class='notice'>You add [I] to the [initial(name)] assembly.</span>"
|
||||
to_chat(user, "<span class='notice'>You add [I] to the [initial(name)] assembly.</span>")
|
||||
beakers += I
|
||||
else
|
||||
user << "<span class='warning'>[I] is empty!</span>"
|
||||
to_chat(user, "<span class='warning'>[I] is empty!</span>")
|
||||
|
||||
else if(stage == EMPTY && istype(I, /obj/item/device/assembly_holder))
|
||||
. = 1 // no afterattack
|
||||
@@ -91,28 +91,28 @@
|
||||
assemblyattacher = user.ckey
|
||||
|
||||
stage_change(WIRED)
|
||||
user << "<span class='notice'>You add [A] to the [initial(name)] assembly.</span>"
|
||||
to_chat(user, "<span class='notice'>You add [A] to the [initial(name)] assembly.</span>")
|
||||
|
||||
else if(stage == EMPTY && istype(I, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = I
|
||||
if (C.use(1))
|
||||
det_time = 50 // In case the cable_coil was removed and readded.
|
||||
stage_change(WIRED)
|
||||
user << "<span class='notice'>You rig the [initial(name)] assembly.</span>"
|
||||
to_chat(user, "<span class='notice'>You rig the [initial(name)] assembly.</span>")
|
||||
else
|
||||
user << "<span class='warning'>You need one length of coil to wire the assembly!</span>"
|
||||
to_chat(user, "<span class='warning'>You need one length of coil to wire the assembly!</span>")
|
||||
return
|
||||
|
||||
else if(stage == READY && istype(I, /obj/item/weapon/wirecutters))
|
||||
stage_change(WIRED)
|
||||
user << "<span class='notice'>You unlock the [initial(name)] assembly.</span>"
|
||||
to_chat(user, "<span class='notice'>You unlock the [initial(name)] assembly.</span>")
|
||||
|
||||
else if(stage == WIRED && istype(I, /obj/item/weapon/wrench))
|
||||
if(beakers.len)
|
||||
for(var/obj/O in beakers)
|
||||
O.loc = get_turf(src)
|
||||
beakers = list()
|
||||
user << "<span class='notice'>You open the [initial(name)] assembly and remove the payload.</span>"
|
||||
to_chat(user, "<span class='notice'>You open the [initial(name)] assembly and remove the payload.</span>")
|
||||
return // First use of the wrench remove beakers, then use the wrench to remove the activation mechanism.
|
||||
if(nadeassembly)
|
||||
nadeassembly.loc = get_turf(src)
|
||||
@@ -121,7 +121,7 @@
|
||||
else // If "nadeassembly = null && stage == WIRED", then it most have been cable_coil that was used.
|
||||
new /obj/item/stack/cable_coil(get_turf(src),1)
|
||||
stage_change(EMPTY)
|
||||
user << "<span class='notice'>You remove the activation mechanism from the [initial(name)] assembly.</span>"
|
||||
to_chat(user, "<span class='notice'>You remove the activation mechanism from the [initial(name)] assembly.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
if(istype(I, /obj/item/slime_extract) && stage == WIRED)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
user << "<span class='notice'>You add [I] to the [initial(name)] assembly.</span>"
|
||||
to_chat(user, "<span class='notice'>You add [I] to the [initial(name)] assembly.</span>")
|
||||
beakers += I
|
||||
else
|
||||
return ..()
|
||||
@@ -265,7 +265,7 @@
|
||||
unit_spread += 25
|
||||
else
|
||||
unit_spread = 5
|
||||
user << "<span class='notice'> You set the time release to [unit_spread] units per detonation.</span>"
|
||||
to_chat(user, "<span class='notice'> You set the time release to [unit_spread] units per detonation.</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -457,6 +457,39 @@
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/glitter
|
||||
name = "generic glitter grenade"
|
||||
desc = "You shouldn't see this description."
|
||||
stage = READY
|
||||
var/glitter_type = "glitter"
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/glitter/New()
|
||||
..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
|
||||
|
||||
B1.reagents.add_reagent(glitter_type, 25)
|
||||
B1.reagents.add_reagent("potassium", 25)
|
||||
B2.reagents.add_reagent("phosphorus", 25)
|
||||
B2.reagents.add_reagent("sugar", 25)
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/glitter/pink
|
||||
name = "pink glitter bomb"
|
||||
desc = "For that HOT glittery look."
|
||||
glitter_type = "pink_glitter"
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/glitter/blue
|
||||
name = "blue glitter bomb"
|
||||
desc = "For that COOL glittery look."
|
||||
glitter_type = "blue_glitter"
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/glitter/white
|
||||
name = "white glitter bomb"
|
||||
desc = "For that somnolent glittery look."
|
||||
glitter_type = "white_glitter"
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/clf3
|
||||
name = "clf3 grenade"
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
/obj/item/weapon/grenade/iedcasing/attack_self(mob/user) //
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
user << "<span class='warning'>You light the [name]!</span>"
|
||||
to_chat(user, "<span class='warning'>You light the [name]!</span>")
|
||||
active = 1
|
||||
cut_overlay(image('icons/obj/grenade.dmi', icon_state = "improvised_grenade_filled"), TRUE) //this line make no sense
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
@@ -67,4 +67,4 @@
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/examine(mob/user)
|
||||
..()
|
||||
user << "You can't tell when it will explode!"
|
||||
to_chat(user, "You can't tell when it will explode!")
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/obj/item/weapon/grenade/proc/clown_check(mob/living/carbon/human/user)
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
user << "<span class='warning'>Huh? How does this thing work?</span>"
|
||||
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
|
||||
active = 1
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
|
||||
@@ -40,15 +40,15 @@
|
||||
..()
|
||||
if(display_timer)
|
||||
if(det_time > 1)
|
||||
user << "The timer is set to [det_time/10] second\s."
|
||||
to_chat(user, "The timer is set to [det_time/10] second\s.")
|
||||
else
|
||||
user << "\The [src] is set for instant detonation."
|
||||
to_chat(user, "\The [src] is set for instant detonation.")
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/attack_self(mob/user)
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
user << "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>"
|
||||
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
|
||||
playsound(user.loc, 'sound/weapons/armbomb.ogg', 60, 1)
|
||||
active = 1
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
@@ -79,16 +79,16 @@
|
||||
switch(det_time)
|
||||
if ("1")
|
||||
det_time = 10
|
||||
user << "<span class='notice'>You set the [name] for 1 second detonation time.</span>"
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 1 second detonation time.</span>")
|
||||
if ("10")
|
||||
det_time = 30
|
||||
user << "<span class='notice'>You set the [name] for 3 second detonation time.</span>"
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 3 second detonation time.</span>")
|
||||
if ("30")
|
||||
det_time = 50
|
||||
user << "<span class='notice'>You set the [name] for 5 second detonation time.</span>"
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 5 second detonation time.</span>")
|
||||
if ("50")
|
||||
det_time = 1
|
||||
user << "<span class='notice'>You set the [name] for instant detonation.</span>"
|
||||
to_chat(user, "<span class='notice'>You set the [name] for instant detonation.</span>")
|
||||
add_fingerprint(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
var/image_overlay = null
|
||||
var/obj/item/device/assembly_holder/nadeassembly = null
|
||||
var/assemblyattacher
|
||||
var/directional = FALSE
|
||||
var/aim_dir = NORTH
|
||||
var/boom_sizes = list(0, 0, 3)
|
||||
|
||||
/obj/item/weapon/grenade/plastic/New()
|
||||
image_overlay = image('icons/obj/grenade.dmi', "[item_state]2")
|
||||
@@ -29,7 +32,7 @@
|
||||
nadeassembly = A
|
||||
A.master = src
|
||||
assemblyattacher = user.ckey
|
||||
user << "<span class='notice'>You add [A] to the [name].</span>"
|
||||
to_chat(user, "<span class='notice'>You add [A] to the [name].</span>")
|
||||
playsound(src, 'sound/weapons/tap.ogg', 20, 1)
|
||||
update_icon()
|
||||
return
|
||||
@@ -42,6 +45,26 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/grenade/plastic/prime()
|
||||
var/turf/location
|
||||
if(target)
|
||||
if(!QDELETED(target))
|
||||
location = get_turf(target)
|
||||
target.cut_overlay(image_overlay, TRUE)
|
||||
else
|
||||
location = get_turf(src)
|
||||
if(location)
|
||||
if(directional && target && target.density)
|
||||
var/turf/T = get_step(location, aim_dir)
|
||||
explosion(get_step(T, aim_dir), boom_sizes[1], boom_sizes[2], boom_sizes[3])
|
||||
else
|
||||
explosion(location, boom_sizes[1], boom_sizes[2], boom_sizes[3])
|
||||
location.ex_act(2, target)
|
||||
if(istype(target, /mob))
|
||||
var/mob/M = target
|
||||
M.gib()
|
||||
qdel(src)
|
||||
|
||||
//assembly stuff
|
||||
/obj/item/weapon/grenade/plastic/receive_signal()
|
||||
prime()
|
||||
@@ -62,15 +85,16 @@
|
||||
if(user.get_active_held_item() == src)
|
||||
newtime = Clamp(newtime, 10, 60000)
|
||||
det_time = newtime
|
||||
user << "Timer set for [det_time] seconds."
|
||||
to_chat(user, "Timer set for [det_time] seconds.")
|
||||
|
||||
/obj/item/weapon/grenade/plastic/afterattack(atom/movable/AM, mob/user, flag)
|
||||
if (!flag)
|
||||
aim_dir = get_dir(user,AM)
|
||||
if(!flag)
|
||||
return
|
||||
if (ismob(AM))
|
||||
if(ismob(AM))
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You start planting the [src]. The timer is set to [det_time]...</span>"
|
||||
to_chat(user, "<span class='notice'>You start planting the [src]. The timer is set to [det_time]...</span>")
|
||||
|
||||
if(do_after(user, 50, target = AM))
|
||||
if(!user.temporarilyRemoveItemFromInventory(src))
|
||||
@@ -78,12 +102,18 @@
|
||||
src.target = AM
|
||||
forceMove(null) //Yep
|
||||
|
||||
if(istype(AM, /obj/item)) //your crappy throwing star can't fly so good with a giant brick of c4 on it.
|
||||
var/obj/item/I = AM
|
||||
I.throw_speed = max(1, (I.throw_speed - 3))
|
||||
I.throw_range = max(1, (I.throw_range - 3))
|
||||
I.embed_chance = 0
|
||||
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] planted [name] on [target.name] at [ADMIN_COORDJMP(target)] with [det_time] second fuse",0,1)
|
||||
log_game("[key_name(user)] planted [name] on [target.name] at [COORD(src)] with [det_time] second fuse")
|
||||
|
||||
target.add_overlay(image_overlay, 1)
|
||||
if(!nadeassembly)
|
||||
user << "<span class='notice'>You plant the bomb. Timer counting down from [det_time].</span>"
|
||||
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [det_time].</span>")
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time*10)
|
||||
else
|
||||
qdel(src) //How?
|
||||
@@ -125,22 +155,6 @@
|
||||
name = "C4"
|
||||
desc = "Used to put holes in specific areas without too much extra hole. A saboteur's favorite."
|
||||
|
||||
/obj/item/weapon/grenade/plastic/c4/prime()
|
||||
var/turf/location
|
||||
if(target)
|
||||
if(!QDELETED(target))
|
||||
location = get_turf(target)
|
||||
target.cut_overlay(image_overlay, TRUE)
|
||||
else
|
||||
location = get_turf(src)
|
||||
if(location)
|
||||
location.ex_act(2, target)
|
||||
explosion(location,0,0,3)
|
||||
if(istype(target, /mob))
|
||||
var/mob/M = target
|
||||
M.gib()
|
||||
qdel(src)
|
||||
|
||||
// X4 is an upgraded directional variant of c4 which is relatively safe to be standing next to. And much less safe to be standing on the other side of.
|
||||
// C4 is intended to be used for infiltration, and destroying tech. X4 is intended to be used for heavy breaching and tight spaces.
|
||||
// Intended to replace C4 for nukeops, and to be a randomdrop in surplus/random traitor purchases.
|
||||
@@ -148,34 +162,7 @@
|
||||
/obj/item/weapon/grenade/plastic/x4
|
||||
name = "X4"
|
||||
desc = "A shaped high-explosive breaching charge. Designed to ensure user safety and wall nonsafety."
|
||||
var/aim_dir = NORTH
|
||||
icon_state = "plasticx40"
|
||||
item_state = "plasticx4"
|
||||
|
||||
/obj/item/weapon/grenade/plastic/x4/prime()
|
||||
var/turf/location
|
||||
if(target)
|
||||
if(!QDELETED(target))
|
||||
location = get_turf(target)
|
||||
target.cut_overlay(image_overlay, TRUE)
|
||||
else
|
||||
location = get_turf(src)
|
||||
if(location)
|
||||
if(istype(loc, /obj/item/weapon/twohanded/spear) || !target)
|
||||
explosion(location, 0, 2, 3)
|
||||
else if(target && target.density)
|
||||
var/turf/T = get_step(location, aim_dir)
|
||||
explosion(get_step(T, aim_dir),0,0,3)
|
||||
explosion(T,0,2,0)
|
||||
location.ex_act(2, target)
|
||||
else
|
||||
explosion(location, 0, 2, 3)
|
||||
location.ex_act(2, target)
|
||||
if(istype(target, /mob))
|
||||
var/mob/M = target
|
||||
M.gib()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/plastic/x4/afterattack(atom/movable/AM, mob/user, flag)
|
||||
aim_dir = get_dir(user,AM)
|
||||
..()
|
||||
directional = TRUE
|
||||
boom_sizes = list(0, 2, 5)
|
||||
@@ -26,7 +26,7 @@
|
||||
if(!istype(C))
|
||||
return
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
user << "<span class='warning'>Uh... how do those things work?!</span>"
|
||||
to_chat(user, "<span class='warning'>Uh... how do those things work?!</span>")
|
||||
apply_cuffs(user,user)
|
||||
return
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
playsound(loc, cuffsound, 30, 1, -2)
|
||||
if(do_mob(user, C, 30) && (C.get_num_arms() >= 2 || C.get_arm_ignore()))
|
||||
apply_cuffs(C,user)
|
||||
user << "<span class='notice'>You handcuff [C].</span>"
|
||||
to_chat(user, "<span class='notice'>You handcuff [C].</span>")
|
||||
if(istype(src, /obj/item/weapon/restraints/handcuffs/cable))
|
||||
feedback_add_details("handcuffs","C")
|
||||
else
|
||||
@@ -52,9 +52,9 @@
|
||||
|
||||
add_logs(user, C, "handcuffed")
|
||||
else
|
||||
user << "<span class='warning'>You fail to handcuff [C]!</span>"
|
||||
to_chat(user, "<span class='warning'>You fail to handcuff [C]!</span>")
|
||||
else
|
||||
user << "<span class='warning'>[C] doesn't have two hands...</span>"
|
||||
to_chat(user, "<span class='warning'>[C] doesn't have two hands...</span>")
|
||||
|
||||
/obj/item/weapon/restraints/handcuffs/proc/apply_cuffs(mob/living/carbon/target, mob/user, var/dispense = 0)
|
||||
if(target.handcuffed)
|
||||
@@ -101,14 +101,14 @@
|
||||
if(!istype(C))
|
||||
return
|
||||
if(wirestorage && wirestorage.energy < 15)
|
||||
user << "<span class='warning'>You need at least 15 wire to restrain [C]!</span>"
|
||||
to_chat(user, "<span class='warning'>You need at least 15 wire to restrain [C]!</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/restraints/handcuffs/cable/apply_cuffs(mob/living/carbon/target, mob/user, var/dispense = 0)
|
||||
if(wirestorage)
|
||||
if(!wirestorage.use_charge(15))
|
||||
user << "<span class='warning'>You need at least 15 wire to restrain [target]!</span>"
|
||||
to_chat(user, "<span class='warning'>You need at least 15 wire to restrain [target]!</span>")
|
||||
return
|
||||
return ..(target, user, 1)
|
||||
|
||||
@@ -167,24 +167,24 @@
|
||||
var/obj/item/weapon/wirerod/W = new /obj/item/weapon/wirerod
|
||||
remove_item_from_storage(user)
|
||||
user.put_in_hands(W)
|
||||
user << "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>"
|
||||
to_chat(user, "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>")
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='warning'>You need one rod to make a wired rod!</span>"
|
||||
to_chat(user, "<span class='warning'>You need one rod to make a wired rod!</span>")
|
||||
return
|
||||
else if(istype(I, /obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = I
|
||||
if(M.get_amount() < 6)
|
||||
user << "<span class='warning'>You need at least six metal sheets to make good enough weights!</span>"
|
||||
to_chat(user, "<span class='warning'>You need at least six metal sheets to make good enough weights!</span>")
|
||||
return
|
||||
user << "<span class='notice'>You begin to apply [I] to [src]...</span>"
|
||||
to_chat(user, "<span class='notice'>You begin to apply [I] to [src]...</span>")
|
||||
if(do_after(user, 35, target = src))
|
||||
if(M.get_amount() < 6 || !M)
|
||||
return
|
||||
var/obj/item/weapon/restraints/legcuffs/bola/S = new /obj/item/weapon/restraints/legcuffs/bola
|
||||
M.use(6)
|
||||
user.put_in_hands(S)
|
||||
user << "<span class='notice'>You make some weights out of [I] and tie them to [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You make some weights out of [I] and tie them to [src].</span>")
|
||||
remove_item_from_storage(user)
|
||||
qdel(src)
|
||||
else
|
||||
@@ -200,10 +200,10 @@
|
||||
if(!C.handcuffed)
|
||||
C.handcuffed = new /obj/item/weapon/restraints/handcuffs/cable/zipties/used(C)
|
||||
C.update_handcuffed()
|
||||
user << "<span class='notice'>You handcuff [C].</span>"
|
||||
to_chat(user, "<span class='notice'>You handcuff [C].</span>")
|
||||
add_logs(user, C, "handcuffed")
|
||||
else
|
||||
user << "<span class='warning'>You fail to handcuff [C]!</span>"
|
||||
to_chat(user, "<span class='warning'>You fail to handcuff [C]!</span>")
|
||||
|
||||
/obj/item/weapon/restraints/handcuffs/cable/zipties
|
||||
name = "zipties"
|
||||
@@ -261,7 +261,7 @@
|
||||
if(ishuman(user) && !user.stat && !user.restrained())
|
||||
armed = !armed
|
||||
icon_state = "[initial(icon_state)][armed]"
|
||||
user << "<span class='notice'>[src] is now [armed ? "armed" : "disarmed"]</span>"
|
||||
to_chat(user, "<span class='notice'>[src] is now [armed ? "armed" : "disarmed"]</span>")
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/beartrap/Crossed(AM as mob|obj)
|
||||
if(armed && isturf(src.loc))
|
||||
@@ -342,7 +342,7 @@
|
||||
src.loc = C
|
||||
C.update_inv_legcuffed()
|
||||
feedback_add_details("handcuffs","B")
|
||||
C << "<span class='userdanger'>\The [src] ensnares you!</span>"
|
||||
to_chat(C, "<span class='userdanger'>\The [src] ensnares you!</span>")
|
||||
C.Weaken(weaken)
|
||||
|
||||
/obj/item/weapon/restraints/legcuffs/bola/tactical//traitor variant
|
||||
|
||||
@@ -15,13 +15,10 @@
|
||||
force = 12
|
||||
attack_verb = list("robusted")
|
||||
hitsound = 'sound/weapons/smash.ogg'
|
||||
var/ascended = FALSE
|
||||
var/awakened = 0
|
||||
var/victims_needed = 20 //how many victims needed to ascend
|
||||
var/awakened = FALSE
|
||||
var/bloodthirst = HIS_GRACE_SATIATED
|
||||
var/prev_bloodthirst = HIS_GRACE_SATIATED
|
||||
var/force_bonus = 0
|
||||
var/ascend_bonus = 15
|
||||
|
||||
/obj/item/weapon/his_grace/New()
|
||||
..()
|
||||
@@ -40,8 +37,6 @@
|
||||
/obj/item/weapon/his_grace/attack(mob/living/M, mob/user)
|
||||
if(awakened && M.stat)
|
||||
consume(M)
|
||||
if(LAZYLEN(contents) >= victims_needed)
|
||||
ascend()
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -53,19 +48,19 @@
|
||||
if(awakened)
|
||||
switch(bloodthirst)
|
||||
if(HIS_GRACE_SATIATED to HIS_GRACE_PECKISH)
|
||||
user << "<span class='his_grace'>[src] isn't very hungry. Not yet.</span>"
|
||||
to_chat(user, "<span class='his_grace'>[src] isn't very hungry. Not yet.</span>")
|
||||
if(HIS_GRACE_PECKISH to HIS_GRACE_HUNGRY)
|
||||
user << "<span class='his_grace'>[src] would like a snack.</span>"
|
||||
to_chat(user, "<span class='his_grace'>[src] would like a snack.</span>")
|
||||
if(HIS_GRACE_HUNGRY to HIS_GRACE_FAMISHED)
|
||||
user << "<span class='his_grace'>[src] is quite hungry now.</span>"
|
||||
to_chat(user, "<span class='his_grace'>[src] is quite hungry now.</span>")
|
||||
if(HIS_GRACE_FAMISHED to HIS_GRACE_STARVING)
|
||||
user << "<span class='his_grace'>[src] is openly salivating at the sight of you. Be careful.</span>"
|
||||
to_chat(user, "<span class='his_grace'>[src] is openly salivating at the sight of you. Be careful.</span>")
|
||||
if(HIS_GRACE_STARVING to HIS_GRACE_CONSUME_OWNER)
|
||||
user << "<span class='his_grace bold'>You walk a fine line. [src] is very close to devouring you.</span>"
|
||||
to_chat(user, "<span class='his_grace bold'>You walk a fine line. [src] is very close to devouring you.</span>")
|
||||
if(HIS_GRACE_CONSUME_OWNER to HIS_GRACE_FALL_ASLEEP)
|
||||
user << "<span class='his_grace bold'>[src] is shaking violently and staring directly at you.</span>"
|
||||
to_chat(user, "<span class='his_grace bold'>[src] is shaking violently and staring directly at you.</span>")
|
||||
else
|
||||
user << "<span class='his_grace'>[src] is latched closed.</span>"
|
||||
to_chat(user, "<span class='his_grace'>[src] is latched closed.</span>")
|
||||
|
||||
/obj/item/weapon/his_grace/relaymove(mob/living/user) //Allows changelings, etc. to climb out of Him after they revive, provided He isn't active
|
||||
if(!awakened)
|
||||
@@ -130,10 +125,10 @@
|
||||
adjust_bloodthirst(1)
|
||||
force_bonus = HIS_GRACE_FORCE_BONUS * LAZYLEN(contents)
|
||||
playsound(user, 'sound/effects/pope_entry.ogg', 100)
|
||||
icon_state = "green_awakened"
|
||||
icon_state = "his_grace_awakened"
|
||||
|
||||
/obj/item/weapon/his_grace/proc/drowse() //Good night, Mr. Grace.
|
||||
if(!awakened || ascended)
|
||||
if(!awakened)
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='boldwarning'>[src] slowly stops rattling and falls still, His latch snapping closed.</span>")
|
||||
@@ -208,17 +203,3 @@
|
||||
if(prev_bloodthirst >= HIS_GRACE_PECKISH)
|
||||
master.visible_message("<span class='warning'>[src] is satiated.</span>", "<span class='his_grace big'>[src]'s hunger recedes...</span>")
|
||||
force = initial(force) + force_bonus
|
||||
|
||||
/obj/item/weapon/his_grace/proc/ascend()
|
||||
if(ascended)
|
||||
return
|
||||
var/mob/living/carbon/human/master = loc
|
||||
force_bonus += ascend_bonus
|
||||
desc = "A legendary toolbox and a distant artifact from The Age of Three Powers. On its three latches engraved are the words \"The Sun\", \"The Moon\", and \"The Stars\". The entire toolbox has the words \"The World\" engraved into its sides."
|
||||
icon_state = "his_grace_ascended"
|
||||
item_state = "toolbox_gold"
|
||||
ascended = TRUE
|
||||
playsound(master, 'sound/effects/his_grace_ascend.ogg', 100)
|
||||
if(istype(master))
|
||||
master.visible_message("<span class='his_grace big bold'>Gods will be watching.</span>", "<span class='his_grace big bold'>God will be watching.</span>")
|
||||
name = "[master]'s mythical toolbox of three powers"
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
var/turf/T = get_turf(target)
|
||||
var/obj/structure/holosign/H = locate(holosign_type) in T
|
||||
if(H)
|
||||
user << "<span class='notice'>You use [src] to deactivate [H].</span>"
|
||||
to_chat(user, "<span class='notice'>You use [src] to deactivate [H].</span>")
|
||||
qdel(H)
|
||||
else
|
||||
if(!is_blocked_turf(T, TRUE)) //can't put holograms on a tile that has dense stuff
|
||||
if(holocreator_busy)
|
||||
user << "<span class='notice'>[src] is busy creating a hologram.</span>"
|
||||
to_chat(user, "<span class='notice'>[src] is busy creating a hologram.</span>")
|
||||
return
|
||||
if(signs.len < max_signs)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 20, 1)
|
||||
@@ -44,9 +44,9 @@
|
||||
if(is_blocked_turf(T, TRUE)) //don't try to sneak dense stuff on our tile during the wait.
|
||||
return
|
||||
H = new holosign_type(get_turf(target), src)
|
||||
user << "<span class='notice'>You create \a [H] with [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You create \a [H] with [src].</span>")
|
||||
else
|
||||
user << "<span class='notice'>[src] is projecting at max capacity!</span>"
|
||||
to_chat(user, "<span class='notice'>[src] is projecting at max capacity!</span>")
|
||||
|
||||
/obj/item/weapon/holosign_creator/attack(mob/living/carbon/human/M, mob/user)
|
||||
return
|
||||
@@ -55,7 +55,7 @@
|
||||
if(signs.len)
|
||||
for(var/H in signs)
|
||||
qdel(H)
|
||||
user << "<span class='notice'>You clear all active holograms.</span>"
|
||||
to_chat(user, "<span class='notice'>You clear all active holograms.</span>")
|
||||
|
||||
|
||||
/obj/item/weapon/holosign_creator/security
|
||||
@@ -108,9 +108,9 @@
|
||||
if(signs.len)
|
||||
for(var/H in signs)
|
||||
qdel(H)
|
||||
user << "<span class='notice'>You clear all active holograms.</span>"
|
||||
to_chat(user, "<span class='notice'>You clear all active holograms.</span>")
|
||||
if(signs.len)
|
||||
for(var/H in signs)
|
||||
qdel(H)
|
||||
user << "<span class='notice'>You clear all active holograms.</span>"
|
||||
to_chat(user, "<span class='notice'>You clear all active holograms.</span>")
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
if(SSreligion.holy_weapon)
|
||||
holy_weapon = new SSreligion.holy_weapon
|
||||
M << "<span class='notice'>The null rod suddenly morphs into your religions already chosen holy weapon.</span>"
|
||||
to_chat(M, "<span class='notice'>The null rod suddenly morphs into your religions already chosen holy weapon.</span>")
|
||||
else
|
||||
var/list/holy_weapons_list = typesof(/obj/item/weapon/nullrod)
|
||||
var/list/display_names = list()
|
||||
@@ -216,7 +216,7 @@
|
||||
if(possessed)
|
||||
return
|
||||
|
||||
user << "You attempt to wake the spirit of the blade..."
|
||||
to_chat(user, "You attempt to wake the spirit of the blade...")
|
||||
|
||||
possessed = TRUE
|
||||
|
||||
@@ -237,12 +237,12 @@
|
||||
S.real_name = input
|
||||
S.name = input
|
||||
else
|
||||
user << "The blade is dormant. Maybe you can try again later."
|
||||
to_chat(user, "The blade is dormant. Maybe you can try again later.")
|
||||
possessed = FALSE
|
||||
|
||||
/obj/item/weapon/nullrod/scythe/talking/Destroy()
|
||||
for(var/mob/living/simple_animal/shade/S in contents)
|
||||
S << "You were destroyed!"
|
||||
to_chat(S, "You were destroyed!")
|
||||
qdel(S)
|
||||
return ..()
|
||||
|
||||
@@ -322,7 +322,7 @@
|
||||
/obj/item/weapon/nullrod/carp/attack_self(mob/living/user)
|
||||
if(used_blessing)
|
||||
else if(user.mind && (user.mind.isholy))
|
||||
user << "You are blessed by Carp-Sie. Wild space carp will no longer attack you."
|
||||
to_chat(user, "You are blessed by Carp-Sie. Wild space carp will no longer attack you.")
|
||||
user.faction |= "carp"
|
||||
used_blessing = TRUE
|
||||
|
||||
@@ -348,10 +348,25 @@
|
||||
desc = "They say fear is the true mind killer, but stabbing them in the head works too. Honour compels you to not sheathe it once drawn."
|
||||
sharpness = IS_SHARP
|
||||
slot_flags = null
|
||||
flags = HANDSLOW
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
/obj/item/weapon/nullrod/tribal_knife/Initialize(mapload)
|
||||
..()
|
||||
SET_SECONDARY_FLAG(src, SLOWS_WHILE_IN_HAND)
|
||||
|
||||
/obj/item/weapon/nullrod/tribal_knife/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/weapon/nullrod/tribal_knife/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/nullrod/tribal_knife/process()
|
||||
slowdown = rand(-2, 2)
|
||||
|
||||
|
||||
/obj/item/weapon/nullrod/pitchfork
|
||||
icon_state = "pitchfork0"
|
||||
name = "unholy pitchfork"
|
||||
@@ -360,15 +375,3 @@
|
||||
attack_verb = list("poked", "impaled", "pierced", "jabbed")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
sharpness = IS_SHARP
|
||||
|
||||
/obj/item/weapon/nullrod/tribal_knife/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/weapon/nullrod/tribal_knife/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/nullrod/tribal_knife/process()
|
||||
slowdown = rand(-2, 2)
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/obj/item/weapon/implant/abductor
|
||||
name = "recall implant"
|
||||
desc = "Returns you to the mothership."
|
||||
@@ -15,7 +14,7 @@
|
||||
cooldown = 0
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
imp_in << "<span class='warning'>You must wait [30 - cooldown] seconds to use [src] again!</span>"
|
||||
to_chat(imp_in, "<span class='warning'>You must wait [30 - cooldown] seconds to use [src] again!</span>")
|
||||
|
||||
/obj/item/weapon/implant/abductor/process()
|
||||
if(cooldown < initial(cooldown))
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
. = ..()
|
||||
tracked_chem_implants -= src
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/implant/chem/trigger(emote, mob/source)
|
||||
if(emote == "deathgasp")
|
||||
activate(reagents.total_volume)
|
||||
@@ -47,19 +44,16 @@
|
||||
else
|
||||
injectamount = cause
|
||||
reagents.trans_to(R, injectamount)
|
||||
R << "<span class='italics'>You hear a faint beep.</span>"
|
||||
to_chat(R, "<span class='italics'>You hear a faint beep.</span>")
|
||||
if(!reagents.total_volume)
|
||||
R << "<span class='italics'>You hear a faint click from your chest.</span>"
|
||||
to_chat(R, "<span class='italics'>You hear a faint click from your chest.</span>")
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/weapon/implantcase/chem
|
||||
name = "implant case - 'Remote Chemical'"
|
||||
desc = "A glass case containing a remote chemical implant."
|
||||
|
||||
/obj/item/weapon/implantcase/chem/New()
|
||||
imp = new /obj/item/weapon/implant/chem(src)
|
||||
..()
|
||||
imp_type = /obj/item/weapon/implant/chem
|
||||
|
||||
/obj/item/weapon/implantcase/chem/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W,/obj/item/weapon/reagent_containers/syringe) && imp)
|
||||
|
||||
@@ -15,16 +15,9 @@
|
||||
|
||||
/obj/item/weapon/implanter/sad_trombone
|
||||
name = "implanter (sad_trombone)"
|
||||
|
||||
/obj/item/weapon/implanter/sad_trombone/New()
|
||||
imp = new /obj/item/weapon/implant/sad_trombone(src)
|
||||
..()
|
||||
|
||||
imp_type = /obj/item/weapon/implant/sad_trombone
|
||||
|
||||
/obj/item/weapon/implantcase/sad_trombone
|
||||
name = "implant case - 'Sad Trombone'"
|
||||
desc = "A glass case containing a sad trombone implant."
|
||||
|
||||
/obj/item/weapon/implantcase/sad_trombone/New()
|
||||
imp = new /obj/item/weapon/implant/sad_trombone(src)
|
||||
..()
|
||||
imp_type = /obj/item/weapon/implant/sad_trombone
|
||||
|
||||
@@ -13,18 +13,11 @@
|
||||
<b>Implant Details:</b> The onboard gateway system has been modified to reject entry by individuals containing this implant<BR>"}
|
||||
return dat
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/exile
|
||||
name = "implanter (exile)"
|
||||
|
||||
/obj/item/weapon/implanter/exile/New()
|
||||
imp = new /obj/item/weapon/implant/exile( src )
|
||||
..()
|
||||
imp_type = /obj/item/weapon/implant/exile
|
||||
|
||||
/obj/item/weapon/implantcase/exile
|
||||
name = "implant case - 'Exile'"
|
||||
desc = "A glass case containing an exile implant."
|
||||
|
||||
/obj/item/weapon/implantcase/exile/New()
|
||||
imp = new /obj/item/weapon/implant/exile(src)
|
||||
..()
|
||||
imp_type = /obj/item/weapon/implant/exile
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
heavy = round(heavy)
|
||||
medium = round(medium)
|
||||
weak = round(weak)
|
||||
imp_in << "<span class='notice'>You activate your [name].</span>"
|
||||
to_chat(imp_in, "<span class='notice'>You activate your [name].</span>")
|
||||
var/turf/boomturf = get_turf(imp_in)
|
||||
var/area/A = get_area(boomturf)
|
||||
message_admins("[key_name_admin(imp_in)]<A HREF='?_src_=holder;adminmoreinfo=\ref[imp_in]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[imp_in]'>FLW</A>) has activated their [name] at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[imp_in.x];Y=[imp_in.y];Z=[imp_in.z]'>[A.name] (JMP)</a>.")
|
||||
@@ -106,16 +106,9 @@
|
||||
|
||||
/obj/item/weapon/implanter/explosive
|
||||
name = "implanter (explosive)"
|
||||
|
||||
/obj/item/weapon/implanter/explosive/New()
|
||||
imp = new /obj/item/weapon/implant/explosive(src)
|
||||
..()
|
||||
|
||||
imp_type = /obj/item/weapon/implant/explosive
|
||||
|
||||
/obj/item/weapon/implantcase/explosive
|
||||
name = "implant case - 'Explosive'"
|
||||
desc = "A glass case containing an explosive implant."
|
||||
|
||||
/obj/item/weapon/implantcase/explosive/New()
|
||||
imp = new /obj/item/weapon/implant/explosive(src)
|
||||
..()
|
||||
imp_type = /obj/item/weapon/implant/explosive
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/obj/item/weapon/implant/freedom/activate()
|
||||
uses--
|
||||
imp_in << "You feel a faint click."
|
||||
to_chat(imp_in, "You feel a faint click.")
|
||||
if(iscarbon(imp_in))
|
||||
var/mob/living/carbon/C_imp_in = imp_in
|
||||
C_imp_in.uncuff()
|
||||
@@ -36,16 +36,9 @@ No Implant Specifics"}
|
||||
|
||||
/obj/item/weapon/implanter/freedom
|
||||
name = "implanter (freedom)"
|
||||
|
||||
/obj/item/weapon/implanter/freedom/New()
|
||||
imp = new /obj/item/weapon/implant/freedom(src)
|
||||
..()
|
||||
|
||||
imp_type = /obj/item/weapon/implant/freedom
|
||||
|
||||
/obj/item/weapon/implantcase/freedom
|
||||
name = "implant case - 'Freedom'"
|
||||
desc = "A glass case containing a freedom implant."
|
||||
|
||||
/obj/item/weapon/implantcase/freedom/New()
|
||||
imp = new /obj/item/weapon/implant/freedom(src)
|
||||
..()
|
||||
imp_type = /obj/item/weapon/implant/freedom
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/obj/item/weapon/implant/gang
|
||||
name = "gang implant"
|
||||
desc = "Makes you a gangster or such."
|
||||
|
||||
@@ -26,15 +26,10 @@
|
||||
|
||||
/obj/item/weapon/implanter/krav_maga
|
||||
name = "implanter (krav maga)"
|
||||
|
||||
/obj/item/weapon/implanter/krav_maga/New()
|
||||
imp = new /obj/item/weapon/implant/krav_maga(src)
|
||||
..()
|
||||
imp_type = /obj/item/weapon/implant/krav_maga
|
||||
|
||||
/obj/item/weapon/implantcase/krav_maga
|
||||
name = "implant case - 'Krav Maga'"
|
||||
desc = "A glass case containing an implant that can teach the user the arts of Krav Maga."
|
||||
imp_type = /obj/item/weapon/implant/krav_maga
|
||||
|
||||
/obj/item/weapon/implantcase/krav_maga/New()
|
||||
imp = new /obj/item/weapon/implant/krav_maga(src)
|
||||
..()
|
||||
|
||||
@@ -36,32 +36,24 @@
|
||||
ticker.mode.remove_revolutionary(target.mind)
|
||||
if(!silent)
|
||||
if(target.mind in ticker.mode.cult)
|
||||
target << "<span class='warning'>You feel something interfering with your mental conditioning, but you resist it!</span>"
|
||||
to_chat(target, "<span class='warning'>You feel something interfering with your mental conditioning, but you resist it!</span>")
|
||||
else
|
||||
target << "<span class='notice'>You feel a sense of peace and security. You are now protected from brainwashing.</span>"
|
||||
to_chat(target, "<span class='notice'>You feel a sense of peace and security. You are now protected from brainwashing.</span>")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/implant/mindshield/removed(mob/target, silent = 0, special = 0)
|
||||
if(..())
|
||||
if(target.stat != DEAD && !silent)
|
||||
target << "<span class='boldnotice'>Your mind suddenly feels terribly vulnerable. You are no longer safe from brainwashing.</span>"
|
||||
to_chat(target, "<span class='boldnotice'>Your mind suddenly feels terribly vulnerable. You are no longer safe from brainwashing.</span>")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/implanter/mindshield
|
||||
name = "implanter (mindshield)"
|
||||
|
||||
/obj/item/weapon/implanter/mindshield/New()
|
||||
imp = new /obj/item/weapon/implant/mindshield(src)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
imp_type = /obj/item/weapon/implant/mindshield
|
||||
|
||||
/obj/item/weapon/implantcase/mindshield
|
||||
name = "implant case - 'Mindshield'"
|
||||
desc = "A glass case containing a mindshield implant."
|
||||
|
||||
/obj/item/weapon/implantcase/mindshield/New()
|
||||
imp = new /obj/item/weapon/implant/mindshield(src)
|
||||
..()
|
||||
imp_type = /obj/item/weapon/implant/mindshield
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
/obj/item/weapon/implant/adrenalin/activate()
|
||||
uses--
|
||||
imp_in << "<span class='notice'>You feel a sudden surge of energy!</span>"
|
||||
to_chat(imp_in, "<span class='notice'>You feel a sudden surge of energy!</span>")
|
||||
imp_in.SetStunned(0)
|
||||
imp_in.SetWeakened(0)
|
||||
imp_in.SetParalysis(0)
|
||||
@@ -79,4 +79,4 @@
|
||||
healthstring = "<small>Oxygen Deprivation Damage => [round(L.getOxyLoss())]<br />Fire Damage => [round(L.getFireLoss())]<br />Toxin Damage => [round(L.getToxLoss())]<br />Brute Force Damage => [round(L.getBruteLoss())]</small>"
|
||||
if (!healthstring)
|
||||
healthstring = "ERROR"
|
||||
return healthstring
|
||||
return healthstring
|
||||
|
||||
@@ -47,7 +47,4 @@
|
||||
|
||||
/obj/item/weapon/implanter/storage
|
||||
name = "implanter (storage)"
|
||||
|
||||
/obj/item/weapon/implanter/storage/New()
|
||||
imp = new /obj/item/weapon/implant/storage(src)
|
||||
..()
|
||||
imp_type = /obj/item/weapon/implant/storage
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
activated = 0
|
||||
origin_tech = "materials=2;magnets=2;programming=2;biotech=2"
|
||||
|
||||
|
||||
/obj/item/weapon/implant/tracking/New()
|
||||
..()
|
||||
tracked_implants += src
|
||||
@@ -13,12 +12,11 @@
|
||||
. = ..()
|
||||
tracked_implants -= src
|
||||
|
||||
/obj/item/weapon/implanter/tracking/New()
|
||||
imp = new /obj/item/weapon/implant/tracking( src )
|
||||
..()
|
||||
/obj/item/weapon/implanter/tracking/gps/New()
|
||||
imp = new /obj/item/device/gps/mining/internal( src )
|
||||
..()
|
||||
/obj/item/weapon/implanter/tracking
|
||||
imp_type = /obj/item/weapon/implant/tracking
|
||||
|
||||
/obj/item/weapon/implanter/tracking/gps
|
||||
imp_type = /obj/item/device/gps/mining/internal
|
||||
|
||||
/obj/item/weapon/implant/tracking/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
origin_tech = "materials=1;biotech=2"
|
||||
materials = list(MAT_GLASS=500)
|
||||
var/obj/item/weapon/implant/imp = null
|
||||
var/imp_type
|
||||
|
||||
|
||||
/obj/item/weapon/implantcase/update_icon()
|
||||
@@ -57,32 +58,24 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/implantcase/New()
|
||||
/obj/item/weapon/implantcase/Initialize(mapload)
|
||||
..()
|
||||
if(imp_type)
|
||||
imp = new imp_type(src)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weapon/implantcase/tracking
|
||||
name = "implant case - 'Tracking'"
|
||||
desc = "A glass case containing a tracking implant."
|
||||
|
||||
/obj/item/weapon/implantcase/tracking/New()
|
||||
imp = new /obj/item/weapon/implant/tracking(src)
|
||||
..()
|
||||
|
||||
imp_type = /obj/item/weapon/implant/tracking
|
||||
|
||||
/obj/item/weapon/implantcase/weapons_auth
|
||||
name = "implant case - 'Firearms Authentication'"
|
||||
desc = "A glass case containing a firearms authentication implant."
|
||||
|
||||
/obj/item/weapon/implantcase/weapons_auth/New()
|
||||
imp = new /obj/item/weapon/implant/weapons_auth(src)
|
||||
..()
|
||||
imp_type = /obj/item/weapon/implant/weapons_auth
|
||||
|
||||
/obj/item/weapon/implantcase/adrenaline
|
||||
name = "implant case - 'Adrenaline'"
|
||||
desc = "A glass case containing an adrenaline implant."
|
||||
|
||||
/obj/item/weapon/implantcase/adrenaline/New()
|
||||
imp = new /obj/item/weapon/implant/adrenalin(src)
|
||||
..()
|
||||
imp_type = /obj/item/weapon/implant/adrenalin
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
/obj/machinery/implantchair
|
||||
name = "mindshield implanter"
|
||||
desc = "Used to implant occupants with mindshield implants."
|
||||
@@ -119,14 +117,14 @@
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
user << "<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about about a minute.)</span>"
|
||||
to_chat(user, "<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about about a minute.)</span>")
|
||||
audible_message("<span class='italics'>You hear a metallic creaking from [src]!</span>",hearing_distance = 2)
|
||||
|
||||
if(do_after(user, 600, target = src))
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || state_open)
|
||||
return
|
||||
visible_message("<span class='warning'>[user] successfully broke out of [src]!</span>")
|
||||
user << "<span class='notice'>You successfully break out of [src]!</span>"
|
||||
to_chat(user, "<span class='notice'>You successfully break out of [src]!</span>")
|
||||
open_machine()
|
||||
|
||||
/obj/machinery/implantchair/relaymove(mob/user)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
origin_tech = "materials=2;biotech=3"
|
||||
materials = list(MAT_METAL=600, MAT_GLASS=200)
|
||||
var/obj/item/weapon/implant/imp = null
|
||||
var/imp_type = null
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/update_icon()
|
||||
@@ -33,13 +34,13 @@
|
||||
if(src && imp)
|
||||
if(imp.implant(M, user))
|
||||
if (M == user)
|
||||
user << "<span class='notice'>You implant yourself.</span>"
|
||||
to_chat(user, "<span class='notice'>You implant yourself.</span>")
|
||||
else
|
||||
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you.</span>")
|
||||
imp = null
|
||||
update_icon()
|
||||
else
|
||||
user << "<span class='warning'>[src] fails to implant [M].</span>"
|
||||
to_chat(user, "<span class='warning'>[src] fails to implant [M].</span>")
|
||||
|
||||
/obj/item/weapon/implanter/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
@@ -55,24 +56,16 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/implanter/New()
|
||||
/obj/item/weapon/implanter/Initialize(mapload)
|
||||
..()
|
||||
if(imp_type)
|
||||
imp = new imp_type(src)
|
||||
update_icon()
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/implanter/adrenalin
|
||||
name = "implanter (adrenalin)"
|
||||
|
||||
/obj/item/weapon/implanter/adrenalin/New()
|
||||
imp = new /obj/item/weapon/implant/adrenalin(src)
|
||||
..()
|
||||
|
||||
imp_type = /obj/item/weapon/implant/adrenalin
|
||||
|
||||
/obj/item/weapon/implanter/emp
|
||||
name = "implanter (EMP)"
|
||||
|
||||
/obj/item/weapon/implanter/emp/New()
|
||||
imp = new /obj/item/weapon/implant/emp(src)
|
||||
..()
|
||||
imp_type = /obj/item/weapon/implant/emp
|
||||
|
||||
@@ -30,17 +30,11 @@
|
||||
|
||||
/obj/item/weapon/implanter/uplink
|
||||
name = "implanter (uplink)"
|
||||
|
||||
/obj/item/weapon/implanter/uplink/New()
|
||||
imp = new /obj/item/weapon/implant/uplink(src)
|
||||
..()
|
||||
imp_type = /obj/item/weapon/implant/uplink
|
||||
|
||||
/obj/item/weapon/implanter/uplink/precharged
|
||||
name = "implanter (uplink)"
|
||||
|
||||
/obj/item/weapon/implanter/uplink/New()
|
||||
imp = new /obj/item/weapon/implant/uplink/precharged(src)
|
||||
..()
|
||||
name = "implanter (precharged uplink)"
|
||||
imp_type = /obj/item/weapon/implant/uplink/precharged
|
||||
|
||||
/obj/item/weapon/implant/uplink/precharged
|
||||
starting_tc = 10
|
||||
|
||||
@@ -869,59 +869,6 @@
|
||||
Good luck!
|
||||
</html>"}
|
||||
|
||||
//citadel code
|
||||
/obj/item/weapon/book/manual/daredice
|
||||
name = "Dare Dice Manual"
|
||||
icon_state = "gamebook"
|
||||
author = "Cactus Space Federation"
|
||||
title = "Dare Dice Manual"
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<style>
|
||||
h1 {font-size: 21px; margin: 15px 0px 5px;}
|
||||
h2 {font-size: 18px; margin: 15px 0px 5px;}
|
||||
h3 {font-size: 15px; margin: 15px 0px 5px;}
|
||||
li {margin: 2px 0px 2px 15px;}
|
||||
ul {list-style: none; margin: 5px; padding: 0px;}
|
||||
ol {margin: 5px; padding: 0px 15px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Dare Dice Manual</h1>
|
||||
|
||||
<h2>Requirements</h2>
|
||||
<h3>Number of Players</h3>
|
||||
At least two, but a small group is preferred
|
||||
<h3>Required Equipment</h3>
|
||||
d100 or d20<br>
|
||||
An open space, or tables and chairs
|
||||
<h3>Optional Equipment</h3>
|
||||
Drinks & snacks<br>
|
||||
Extra clothing<br>
|
||||
Pen & paper
|
||||
<h2>How To Play</h2>
|
||||
<ol>
|
||||
<li>To start the game, one player chosen by any means starts by rolling the game die. This player then passes the die to the player next to them, traveling clockwise. Make sure to remember the number you rolled!</li>
|
||||
<li>The die continues around the table until it reaches the first player again.</li>
|
||||
<li>The players with the highest and lowest rolled numbers are selected as the 'darer' and the 'dared' respectively.</li>
|
||||
<li>If the dared player finishes the dare sufficiently, they receive <b>1</b> point.</li>
|
||||
</ol>
|
||||
Repeat the cycle until a player reaches <b>5</b> points, then they win! The winner decides who starts rolling first in the next game and can give or receive one free dare from any player of their choice.
|
||||
<h3>Ties</h3>
|
||||
Ties between two or more players can usually be ignored. In a case where two or more players tie for the position of the darer or dared, the tied players can reroll until there is one darer and one dared.<br>
|
||||
Alternatively, ties can be ignored completely. To continue playing with multiple dared or darers, simply have each darer give one dare to each dared player.
|
||||
<h3>Special Rules</h3>
|
||||
<li>Dares which break the law are automatically invalid. The dared should ask the darer for a different one.</li>
|
||||
<li>Dares which are impossible to complete are automatically invalid. The dared should ask the darer for a different one. </li>
|
||||
<li>If the dared player cannot complete a dare fully, but the table unanimously agrees that they still deserve the point then they receive it.</li>
|
||||
<li>All dares must take place within the general vicinity of the table or game space so all players can see.</li>
|
||||
<li>Depending on the amount of players, the amount of points required to win can vary. Adjust as needed.</li>
|
||||
<h3>Notes</h3>
|
||||
Dare Dice is, by far, the most popular dice game in space right now. However, players should be prepared for anything when entering a game. While the game is simple in essence; dares can be quite complicated, sometimes requiring multiple steps and/or testing your mental and physical abilities. Some dares might be downright shameful, degrading, or disgusting to some players. Thick skin is recommended.
|
||||
</body>
|
||||
</html>
|
||||
"}
|
||||
|
||||
// Wiki books that are linked to the configured wiki link.
|
||||
|
||||
// A book that links to the wiki
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
var/throwforce_on = 20
|
||||
var/icon_state_on = "axe1"
|
||||
var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
var/list/possible_colors
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
sharpness = IS_SHARP
|
||||
var/w_class_on = WEIGHT_CLASS_BULKY
|
||||
@@ -12,6 +13,23 @@
|
||||
max_integrity = 200
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 30)
|
||||
resistance_flags = FIRE_PROOF
|
||||
var/brightness_on = 3
|
||||
|
||||
/obj/item/weapon/melee/energy/Initialize()
|
||||
..()
|
||||
if(LAZYLEN(possible_colors))
|
||||
item_color = pick(possible_colors)
|
||||
switch(item_color)//Only run this check if the color was picked randomly, so that colors can be manually set for non-random colored energy weapons.
|
||||
if("red")
|
||||
light_color = LIGHT_COLOR_RED
|
||||
if("green")
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
if("blue")
|
||||
light_color = LIGHT_COLOR_LIGHT_CYAN
|
||||
if("purple")
|
||||
light_color = LIGHT_COLOR_LAVENDER
|
||||
if(active)
|
||||
set_light(brightness_on)
|
||||
|
||||
/obj/item/weapon/melee/energy/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is [pick("slitting [user.p_their()] stomach open with", "falling on")] [src]! It looks like [user.p_theyre()] trying to commit seppuku!</span>")
|
||||
@@ -25,7 +43,7 @@
|
||||
|
||||
/obj/item/weapon/melee/energy/axe
|
||||
name = "energy axe"
|
||||
desc = "An energised battle axe."
|
||||
desc = "An energized battle axe."
|
||||
icon_state = "axe0"
|
||||
force = 40
|
||||
force_on = 150
|
||||
@@ -41,6 +59,7 @@
|
||||
origin_tech = "combat=4;magnets=3"
|
||||
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
|
||||
attack_verb_on = list()
|
||||
light_color = "#40ceff"
|
||||
|
||||
/obj/item/weapon/melee/energy/axe/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] swings [src] towards [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
@@ -61,18 +80,17 @@
|
||||
armour_penetration = 35
|
||||
origin_tech = "combat=3;magnets=4;syndicate=4"
|
||||
block_chance = 50
|
||||
possible_colors = list("red", "blue", "green", "purple")
|
||||
var/hacked = 0
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/New()
|
||||
if(item_color == null)
|
||||
item_color = pick("red", "blue", "green", "purple")
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/process()
|
||||
if(active)
|
||||
if(hacked)
|
||||
light_color = pick(LIGHT_COLOR_RED, LIGHT_COLOR_GREEN, LIGHT_COLOR_LIGHT_CYAN, LIGHT_COLOR_LAVENDER)
|
||||
open_flame()
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
@@ -84,7 +102,7 @@
|
||||
|
||||
/obj/item/weapon/melee/energy/attack_self(mob/living/carbon/user)
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
user << "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>"
|
||||
to_chat(user, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
|
||||
user.take_bodypart_damage(5,5)
|
||||
active = !active
|
||||
if (active)
|
||||
@@ -100,8 +118,9 @@
|
||||
icon_state = "sword[item_color]"
|
||||
w_class = w_class_on
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
|
||||
user << "<span class='notice'>[src] is now active.</span>"
|
||||
to_chat(user, "<span class='notice'>[src] is now active.</span>")
|
||||
START_PROCESSING(SSobj, src)
|
||||
set_light(brightness_on)
|
||||
else
|
||||
force = initial(force)
|
||||
throwforce = initial(throwforce)
|
||||
@@ -112,8 +131,9 @@
|
||||
icon_state = initial(icon_state)
|
||||
w_class = initial(w_class)
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
|
||||
user << "<span class='notice'>[src] can now be concealed.</span>"
|
||||
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
set_light(0)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/weapon/melee/energy/is_hot()
|
||||
@@ -141,7 +161,7 @@
|
||||
var/obj/item/weapon/stock_parts/cell/C = R.cell
|
||||
if(active && !(C.use(hitcost)))
|
||||
attack_self(R)
|
||||
R << "<span class='notice'>It's out of charge!</span>"
|
||||
to_chat(R, "<span class='notice'>It's out of charge!</span>")
|
||||
return
|
||||
..()
|
||||
return
|
||||
@@ -160,6 +180,8 @@
|
||||
item_color = null
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
sharpness = IS_SHARP
|
||||
light_color = "#40ceff"
|
||||
possible_colors = null
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/cyborg/saw/New()
|
||||
..()
|
||||
@@ -172,22 +194,21 @@
|
||||
/obj/item/weapon/melee/energy/sword/saber
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/saber/blue
|
||||
item_color = "blue"
|
||||
possible_colors = list("blue")
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/saber/purple
|
||||
item_color = "purple"
|
||||
possible_colors = list("purple")
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/saber/green
|
||||
item_color = "green"
|
||||
possible_colors = list("green")
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/saber/red
|
||||
item_color = "red"
|
||||
possible_colors = list("red")
|
||||
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/saber/attackby(obj/item/weapon/W, mob/living/user, params)
|
||||
if(istype(W, /obj/item/weapon/melee/energy/sword/saber))
|
||||
user << "<span class='notice'>You attach the ends of the two \
|
||||
energy swords, making a single double-bladed weapon! \
|
||||
You're cool.</span>"
|
||||
to_chat(user, "<span class='notice'>You attach the ends of the two energy swords, making a single double-bladed weapon! You're cool.</span>")
|
||||
var/obj/item/weapon/melee/energy/sword/saber/other_esword = W
|
||||
var/obj/item/weapon/twohanded/dualsaber/newSaber = new(user.loc)
|
||||
if(hacked || other_esword.hacked)
|
||||
@@ -200,13 +221,13 @@
|
||||
if(hacked == 0)
|
||||
hacked = 1
|
||||
item_color = "rainbow"
|
||||
user << "<span class='warning'>RNBW_ENGAGE</span>"
|
||||
to_chat(user, "<span class='warning'>RNBW_ENGAGE</span>")
|
||||
|
||||
if(active)
|
||||
icon_state = "swordrainbow"
|
||||
user.update_inv_hands()
|
||||
else
|
||||
user << "<span class='warning'>It's already fabulous!</span>"
|
||||
to_chat(user, "<span class='warning'>It's already fabulous!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -215,6 +236,7 @@
|
||||
desc = "Arrrr matey."
|
||||
icon_state = "cutlass0"
|
||||
icon_state_on = "cutlass1"
|
||||
light_color = "#ff0000"
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/pirate/New()
|
||||
return
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "arm_blade"
|
||||
item_state = "arm_blade"
|
||||
origin_tech = "combat=5,biotech=5"
|
||||
origin_tech = "combat=5;biotech=5"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
force = 20
|
||||
throwforce = 10
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
add_fingerprint(user)
|
||||
if((CLUMSY in user.disabilities) && prob(50))
|
||||
user << "<span class ='danger'>You club yourself over the head.</span>"
|
||||
to_chat(user, "<span class ='danger'>You club yourself over the head.</span>")
|
||||
user.Weaken(3 * force)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
@@ -154,14 +154,14 @@
|
||||
/obj/item/weapon/melee/classic_baton/telescopic/attack_self(mob/user)
|
||||
on = !on
|
||||
if(on)
|
||||
user << "<span class ='warning'>You extend the baton.</span>"
|
||||
to_chat(user, "<span class ='warning'>You extend the baton.</span>")
|
||||
icon_state = "telebaton_1"
|
||||
item_state = "nullrod"
|
||||
w_class = WEIGHT_CLASS_BULKY //doesnt fit in backpack when its on for balance
|
||||
force = 10 //stunbaton damage
|
||||
attack_verb = list("smacked", "struck", "cracked", "beaten")
|
||||
else
|
||||
user << "<span class ='notice'>You collapse the baton.</span>"
|
||||
to_chat(user, "<span class ='notice'>You collapse the baton.</span>")
|
||||
icon_state = "telebaton_0"
|
||||
item_state = null //no sprite for concealment even when in hand
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user