I forgot how children work guys

Merge branch 'master' of https://github.com/tgstation/-tg-station into wands3
This commit is contained in:
Incoming
2013-12-19 15:07:59 -05:00
117 changed files with 2302 additions and 1953 deletions
+6 -6
View File
@@ -6,17 +6,16 @@
//To successfully stop you taking all pressure damage you must have both a suit and head item with this flag.
#define TABLEPASS 2 // can pass by a table or rack ~ apparently actually unused, uses pass_flags instead
#define NOBLUDGEON 4 // when an item has this it produces no "X has been hit by Y with Z" message in the default attackby()
#define MASKINTERNALS 8 // mask allows internals
//#define SUITSPACE 8 // suit protects against space
#define USEDELAY 16 // For adding extra delay to heavy items, not currently used
#define NOSHIELD 32 // weapon not affected by shield
#define CONDUCT 64 // conducts electricity (metal etc.)
#define ABSTRACT 128 // for all things that are technically items but used for various different stuff, made it 128 because it could conflict with other flags other way
#define FPRINT 256 // takes a fingerprint
#define ON_BORDER 512 // item has priority to check when entering or leaving
#define NOBLUDGEON 4 // when an item has this it produces no "X has been hit by Y with Z" message in the default attackby()
#define GLASSESCOVERSEYES 1024
#define MASKCOVERSEYES 1024 // get rid of some of the other retardation in these flags
@@ -24,12 +23,13 @@
#define MASKCOVERSMOUTH 2048 // on other items, these are just for mask/head
#define HEADCOVERSMOUTH 2048
#define NOSLIP 1024 //prevents from slipping on wet floors, in space etc
#define NOSLIP 1024 //prevents from slipping on wet floors, in space etc (NOTE: flag shared with THICKMATERIAL for external suits and helmet)
#define OPENCONTAINER 4096 // is an open container for chemistry purposes
#define BLOCK_GAS_SMOKE_EFFECT 8192 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! (NOTE: flag shared with ONESIZEFITSALL)
#define ONESIZEFITSALL 8192 // can be worn by fatties (or children? ugh) --jumpsuit only (NOTE: flag shared with BLOCK_GAS_SMOKE_EFFECT)
// BLOCK_GAS_SMOKE_EFFECT only used in masks at the moment.
#define BLOCK_GAS_SMOKE_EFFECT 8192 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! (NOTE: flag shared with THICKMATERIAL)
#define THICKMATERIAL 8192 //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. (NOTE: flag shared with BLOCK_GAS_SMOKE_EFFECT)
#define NOREACT 16384 //Reagents dont' react inside this container.
+21 -3
View File
@@ -34,9 +34,9 @@ proc/random_name(gender, attempts_to_find_unique_name=10)
for(var/i=1, i<=attempts_to_find_unique_name, i++)
if(gender==FEMALE) . = capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
else . = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
if(i != attempts_to_find_unique_name && !findname(.))
break
break
proc/random_skin_tone()
return pick(skin_tones)
@@ -67,4 +67,22 @@ proc/age2agedescription(age)
if(45 to 60) return "middle-aged"
if(60 to 70) return "aging"
if(70 to INFINITY) return "elderly"
else return "unknown"
else return "unknown"
/*
Proc for attack log creation, because really why not
1 argument is the actor
2 argument is the target of action
3 is the description of action(like punched, throwed, or any other verb)
4 should it make adminlog note or not
5 is the tool with which the action was made(usually item) 5 and 6 are very similar(5 have "by " before it, that it) and are separated just to keep things in a bit more in order
6 is additional information, anything that needs to be added
*/
proc/add_logs(mob/user, mob/target, what_done, var/admin=1, var/object=null, var/addition=null)
if(user && ismob(user))
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has [what_done] [target ? "[target.name][target.ckey ? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]</font>")
if(target && ismob(target))
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [what_done] by [user ? "[user.name][user.ckey ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]</font>")
if(admin)
log_attack("<font color='red'>[user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"] [what_done] [target ? "[target.name][(ismob(target) && target.ckey)? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]</font>")
+1 -3
View File
@@ -35,9 +35,7 @@
user.lastattacked = M
M.lastattacker = user
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>" )
add_logs(user, M, "attacked", src.name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])")
//spawn(1800) // this wont work right
// M.lastattacker = null
+2 -2
View File
@@ -97,7 +97,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
//Cutting this wire electrifies the door, so that the next person to touch the door without insulated gloves gets electrocuted.
if(A.secondsElectrified != -1)
A.shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Electrified the [A.name] at [A.x] [A.y] [A.z]</font>")
add_logs(usr, A, "electrified", admin=0, addition="at [A.x],[A.y],[A.z]")
A.secondsElectrified = -1
else
if(A.secondsElectrified == -1)
@@ -163,7 +163,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
//one wire for electrifying the door. Sending a pulse through this electrifies the door for 30 seconds.
if(A.secondsElectrified==0)
A.shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Electrified the [A.name] at [A.x] [A.y] [A.z]</font>")
add_logs(usr, A, "electrified", admin=0, addition="at [A.x],[A.y],[A.z]")
A.secondsElectrified = 30
spawn(10)
if(A)
+2 -2
View File
@@ -94,8 +94,8 @@
/atom/proc/emp_act(var/severity)
return
/atom/proc/bullet_act(obj/item/projectile/P)
P.on_hit(src,0)
/atom/proc/bullet_act(obj/item/projectile/P, def_zone)
P.on_hit(src, 0, def_zone)
. = 0
/atom/proc/in_contents_of(container)//can take class or object instance as argument
+70 -37
View File
@@ -240,54 +240,54 @@
if(blocks[NEARSIGHTEDBLOCK])
M.disabilities |= NEARSIGHTED
M << "\red Your eyes feel strange."
M << "<span class='danger'>Your eyes feel strange.</span>"
if(blocks[EPILEPSYBLOCK])
M.disabilities |= EPILEPSY
M << "\red You get a headache."
M << "<span class='danger'>You get a headache.</span>"
if(blocks[STRANGEBLOCK])
M << "\red You feel strange."
M << "<span class='danger'>You feel strange.</span>"
if(prob(95))
if(prob(50)) randmutb(M)
else randmuti(M)
else randmutg(M)
if(blocks[COUGHBLOCK])
M.disabilities |= COUGHING
M << "\red You start coughing."
M << "<span class='danger'>You start coughing.</span>"
if(blocks[CLUMSYBLOCK])
M << "\red You feel lightheaded."
M << "<span class='danger'>You feel lightheaded.</span>"
M.mutations |= CLUMSY
if(blocks[TOURETTESBLOCK])
M.disabilities |= TOURETTES
M << "\red You twitch."
M << "<span class='danger'>You twitch.</span>"
if(blocks[NERVOUSBLOCK])
M.disabilities |= NERVOUS
M << "\red You feel nervous."
M << "<span class='danger'>You feel nervous.</span>"
if(blocks[DEAFBLOCK])
M.sdisabilities |= DEAF
M.ear_deaf = 1
M << "\red You can't seem to hear anything..."
M << "<span class='danger'>You can't seem to hear anything.</span>"
if(blocks[BLINDBLOCK])
M.sdisabilities |= BLIND
M << "\red You can't seem to see anything."
M << "<span class='danger'>You can't seem to see anything.</span>"
if(blocks[HULKBLOCK])
if(inj || prob(10))
M.mutations |= HULK
M << "\blue Your muscles hurt."
M << "<span class='notice'>Your muscles hurt.</span>"
if(blocks[XRAYBLOCK])
if(inj || prob(30))
M.mutations |= XRAY
M << "\blue The walls suddenly disappear."
M << "<span class='notice'>The walls suddenly disappear.</span>"
M.sight |= SEE_MOBS|SEE_OBJS|SEE_TURFS
M.see_in_dark = 8
M.see_invisible = SEE_INVISIBLE_LEVEL_TWO
if(blocks[FIREBLOCK])
if(inj || prob(30))
M.mutations |= COLD_RESISTANCE
M << "\blue Your body feels warm."
M << "<span class='notice'>Your body feels warm.</span>"
if(blocks[TELEBLOCK])
if(inj || prob(25))
M.mutations |= TK
M << "\blue You feel smarter."
M << "<span class='notice'>You feel smarter.</span>"
/* If you want the new mutations to work, UNCOMMENT THIS.
@@ -339,20 +339,21 @@
/obj/machinery/dna_scannernew/New()
..()
component_parts = newlist(
/obj/item/weapon/circuitboard/clonescanner,
/obj/item/weapon/stock_parts/scanning_module,
/obj/item/weapon/stock_parts/manipulator,
/obj/item/weapon/stock_parts/micro_laser,
/obj/item/weapon/stock_parts/console_screen,
/obj/item/weapon/cable_coil,
/obj/item/weapon/cable_coil
)
RefreshParts()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/clonescanner(null)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
component_parts += new /obj/item/weapon/cable_coil(null, 1)
component_parts += new /obj/item/weapon/cable_coil(null, 1)
/obj/machinery/dna_scannernew/proc/toggle_open()
if(open) return close()
else return open()
/obj/machinery/dna_scannernew/proc/toggle_open(mob/user=usr)
if(!user)
return
if(open) return close(user)
else return open(user)
/obj/machinery/dna_scannernew/container_resist()
var/mob/living/user = usr
@@ -363,8 +364,7 @@
user.next_move = world.time + 100
user.last_special = world.time + 100
user << "<span class='notice'>You lean on the back of [src] and start pushing the door open. (this will take about [breakout_time] minutes.)</span>"
for(var/mob/O in viewers(src))
O << "<span class='warning'>You hear a metallic creaking from [src]!</span>"
user.visible_message("<span class='warning'>You hear a metallic creaking from [src]!</span>")
if(do_after(user,(breakout_time*60*10))) //minutes * 60seconds * 10deciseconds
if(!user || user.stat != CONSCIOUS || user.loc != src || open || !locked)
@@ -374,10 +374,13 @@
visible_message("<span class='danger'>[user] successfully broke out of [src]!</span>")
user << "<span class='notice'>You successfully break out of [src]!</span>"
open()
open(user)
/obj/machinery/dna_scannernew/proc/close()
/obj/machinery/dna_scannernew/proc/close(mob/user)
if(open)
if(panel_open)
user << "<span class='notice'>Close the maintenance panel first.</span>"
return 0
open = 0
density = 1
for(var/mob/living/carbon/C in loc)
@@ -407,10 +410,13 @@
return 1
/obj/machinery/dna_scannernew/proc/open()
/obj/machinery/dna_scannernew/proc/open(mob/user)
if(!open)
if(panel_open)
user << "<span class='notice'>Close the maintenance panel first.</span>"
return
if(locked)
usr << "<span class='notice'>The bolts are locked down, securing the door shut.</span>"
user << "<span class='notice'>The bolts are locked down, securing the door shut.</span>"
return
var/turf/T = get_turf(src)
if(T)
@@ -428,10 +434,35 @@
/obj/machinery/dna_scannernew/relaymove(mob/user as mob)
if(user.stat)
return
open()
open(user)
return
/obj/machinery/dna_scannernew/attackby(obj/item/weapon/grab/G, mob/user)
if(istype(G, /obj/item/weapon/screwdriver))
if(occupant)
user << "<span class='notice'>The maintenance panel is locked.</span>"
return
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
panel_open = !panel_open
if(panel_open)
icon_state = "[icon_state]_maintenance"
user << "<span class='notice'>You open the maintenance panel of [src].</span>"
else
if(open)
icon_state = "[initial(icon_state)]_open"
else
icon_state = "[initial(icon_state)]"
user << "<span class='notice'>You close the maintenance panel of [src].</span>"
return
if(istype(G, /obj/item/weapon/crowbar))
if(panel_open)
for(var/obj/I in contents) // in case there is something in the scanner
I.loc = src.loc
default_deconstruction_crowbar()
return
if(!istype(G, /obj/item/weapon/grab) || !ismob(G.affecting))
return
if(!open)
@@ -443,8 +474,9 @@
del(G)
/obj/machinery/dna_scannernew/attack_hand(mob/user)
if(..()) return
toggle_open()
if(..())
return
toggle_open(user)
add_fingerprint(user)
@@ -482,6 +514,7 @@
del(src)
//DNA COMPUTER
/obj/machinery/computer/scan_consolenew
name = "\improper DNA scanner access console"
desc = "Scan DNA."
@@ -509,7 +542,7 @@
user.drop_item()
I.loc = src
src.diskette = I
user << "You insert [I]."
user << "<span class='notice'>You insert [I].</span>"
src.updateUsrDialog()
return
else
@@ -749,7 +782,7 @@
if("togglelock")
if(connected) connected.locked = !connected.locked
if("toggleopen")
if(connected) connected.toggle_open()
if(connected) connected.toggle_open(usr)
if("setduration")
if(!num)
num = round(input(usr, "Choose pulse duration:", "Input an Integer", null) as num|null)
@@ -2,7 +2,7 @@
/mob/proc/make_changeling()
if(!mind) return
if(!mind.changeling) mind.changeling = new /datum/changeling(gender)
if(!iscarbon(src)) return
if(!ishuman(src) && !ismonkey(src)) return
verbs += /datum/changeling/proc/EvolutionMenu
@@ -29,7 +29,8 @@
//removes our changeling verbs
/mob/proc/remove_changeling_powers()
var/mob/living/carbon/C = src
C.unset_sting()
if(ishuman(C) || ismonkey(C))
C.unset_sting()
for(var/datum/power/changeling/P in powerinstances)
if(P.isVerb)
verbs -= P.verbpath
@@ -532,11 +533,6 @@ var/list/datum/dna/hivemind_bank = list()
//STINGS// //They get a pretty header because there's just so fucking many of them ;_;
//////////
/mob/living/carbon/proc/add_sting_logs(mob/T, sting_name, datum/dna/DNA)
src.attack_log += "\[[time_stamp()]\]<font color='red'> Stung [T.name] ([T.ckey]) with [sting_name] sting[!DNA ? "." : ", giving him [DNA.real_name] appearance."]</font>"
T.attack_log += "\[[time_stamp()]\]<font color='orange'> Was stung by [src.name] ([src.ckey]) with [sting_name] sting[!DNA ? "." : ", and took [DNA.real_name] appearance."]</font>"
log_attack("<font color='red'>[src.name] ([src.ckey]) stung [T.name] ([T.ckey]) with [sting_name] sting[!DNA ? "." : ", giving him [DNA.real_name] appearance."]</font>" )
/mob/living/carbon/proc/set_sting(A, icon, dna=null) //setting the sting and ui icon for it
src << "<span class='notice'>We prepare our sting, use alt+click on target to sting them.</span>"
src.mind.changeling.chosen_sting = A
@@ -585,7 +581,7 @@ var/list/datum/dna/hivemind_bank = list()
set_sting(/mob/living/carbon/proc/sting_effect_trasnform, "sting_transform", D)
/mob/living/carbon/proc/sting_effect_trasnform(mob/living/carbon/T)
add_sting_logs(T, "transformation", src.mind.changeling.chosen_dna)
add_logs(src, T, "stung", "transformation sting", "new identity is [src.mind.changeling.chosen_dna.real_name]")
if(!sting_can_reach(T, 40))
return 0
if((HUSK in T.mutations) || !check_dna_integrity(T))
@@ -607,7 +603,7 @@ var/list/datum/dna/hivemind_bank = list()
set_sting(/mob/living/carbon/proc/sting_effect_extract, "sting_extract")
/mob/living/carbon/proc/sting_effect_extract(mob/living/carbon/T)
add_sting_logs(T, "extracting")
add_logs(src, T, "stung", "extraction sting")
if(!sting_can_reach(T, 25))
return 0
if(src.mind.changeling.can_absorb_dna(T, usr))
@@ -626,7 +622,7 @@ var/list/datum/dna/hivemind_bank = list()
set_sting(/mob/living/carbon/proc/sting_effect_mute, "sting_mute")
/mob/living/carbon/proc/sting_effect_mute(mob/living/carbon/T)
add_sting_logs(T, "mute")
add_logs(src, T, "stung", "mute sting")
if(!sting_can_reach(T, 20))
return 0
T.silent += 30
@@ -641,7 +637,7 @@ var/list/datum/dna/hivemind_bank = list()
set_sting(/mob/living/carbon/proc/sting_effect_blind, "sting_blind")
/mob/living/carbon/proc/sting_effect_blind(mob/living/carbon/T)
add_sting_logs(T, "blind")
add_logs(src, T, "stung", "blind sting")
if(!sting_can_reach(T, 25))
return 0
T << "<span class='danger'>Your eyes burn horrifically!</span>"
@@ -659,7 +655,7 @@ var/list/datum/dna/hivemind_bank = list()
set_sting(/mob/living/carbon/proc/sting_effect_lsd, "sting_lsd")
/mob/living/carbon/proc/sting_effect_lsd(mob/living/carbon/T)
add_sting_logs(T, "LSD")
add_logs(src, T, "stung", "LSD sting")
if(!sting_can_reach(T, 5))
return 0
spawn(rand(300,600))
@@ -675,7 +671,7 @@ var/list/datum/dna/hivemind_bank = list()
set_sting(/mob/living/carbon/proc/sting_effect_cryo, "sting_cryo")
/mob/living/carbon/proc/sting_effect_cryo(mob/living/carbon/T)
add_sting_logs(T, "cryo")
add_logs(src, T, "stung", "cryo sting")
if(!sting_can_reach(T, 15))
return 0
if(T.reagents)
+2 -2
View File
@@ -55,7 +55,7 @@
desc = "A set of armored robes worn by the followers of Nar-Sie"
icon_state = "cultrobes"
item_state = "cultrobes"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
body_parts_covered = CHEST|GROIN|LEGS|ARMS
allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade)
armor = list(melee = 50, bullet = 30, laser = 50,energy = 20, bomb = 25, bio = 10, rad = 0)
@@ -79,7 +79,7 @@
desc = "A set of armored robes worn by the followers of Nar-Sie"
icon_state = "magusred"
item_state = "magusred"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
body_parts_covered = CHEST|GROIN|LEGS|ARMS
allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade)
armor = list(melee = 50, bullet = 30, laser = 50,energy = 20, bomb = 25, bio = 10, rad = 0)
+1 -6
View File
@@ -460,12 +460,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
// usr << browse(null, "window=tank")
attack(mob/living/M as mob, mob/living/user as mob)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had the [name] used on him by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used [name] on [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) used [name] on [M.name] ([M.ckey])</font>")
add_logs(user, M, "smacked", object=src)
if(istype(M,/mob/dead))
M.invisibility = 0
user.visible_message( \
+1 -5
View File
@@ -18,11 +18,7 @@
return ..()
if(istype(M, /mob/living/carbon/human/dummy))
return..()
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their soul captured with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to capture the soul of [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) used the [src.name] to capture the soul of [M.name] ([M.ckey])</font>")
add_logs(user, M, "captured [M.name]'s soul", object=src)
transfer_soul("VICTIM", M, user)
return
+10 -1
View File
@@ -178,6 +178,7 @@
return ..()
var/wizards_alive = 0
var/traitors_alive = 0
for(var/datum/mind/wizard in wizards)
if(!istype(wizard.current,/mob/living/carbon))
continue
@@ -185,7 +186,15 @@
continue
wizards_alive++
if (wizards_alive)
if(!wizards_alive)
for(var/datum/mind/traitor in traitors)
if(!istype(traitor.current,/mob/living/carbon))
continue
if(traitor.current.stat==2)
continue
traitors_alive++
if (wizards_alive || traitors_alive)
return ..()
else
finished = 1
+1 -9
View File
@@ -176,21 +176,13 @@ var/global/list/autolathe_recipes_hidden = list( \
return 1
if (opened)
if(istype(O, /obj/item/weapon/crowbar))
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
if(m_amount >= 3750)
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
G.amount = round(m_amount / 3750)
if(g_amount >= 3750)
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
G.amount = round(g_amount / 3750)
del(src)
default_deconstruction_crowbar()
return 1
else
user.set_machine(src)
+1 -1
View File
@@ -64,7 +64,7 @@
if(M.melee_damage_upper == 0) return
src.health -= M.melee_damage_upper
src.visible_message("\red <B>[M] has [M.attacktext] [src]!</B>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
add_logs(M, src, "attacked", admin=0)
if(prob(10))
new /obj/effect/decal/cleanable/oil(src.loc)
healthcheck()
-1
View File
@@ -14,7 +14,6 @@
var/c_tag_order = 999
var/status = 1.0
anchored = 1.0
var/panel_open = 0 // 0 = Closed / 1 = Open
var/invuln = null
var/obj/item/device/camera_bug/bug = null
var/obj/item/weapon/camera_assembly/assembly = null
+33 -3
View File
@@ -19,6 +19,19 @@
var/attempting = 0 //One clone attempt at a time thanks
var/eject_wait = 0 //Don't eject them as soon as they are created fuckkk
/obj/machinery/clonepod/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/clonepod(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/weapon/cable_coil(src, 1)
component_parts += new /obj/item/weapon/cable_coil(src, 1)
//The return of data disks?? Just for transferring between genetics machine/cloning machine.
//TO-DO: Make the genetics machine accept them.
/obj/item/weapon/disk/data
@@ -98,6 +111,8 @@
//Start growing a human clone in the pod!
/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/mrace)
if(panel_open)
return 0
if(mess || attempting)
return 0
var/datum/mind/clonemind = locate(mindref)
@@ -217,7 +232,7 @@
src.occupant = null
if (src.locked)
src.locked = 0
if (!src.mess)
if (!src.mess && !panel_open)
icon_state = "pod_0"
use_power(200)
return
@@ -226,14 +241,27 @@
//Let's unlock this early I guess. Might be too early, needs tweaking.
/obj/machinery/clonepod/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/screwdriver))
if(occupant || mess || locked)
user << "<span class='notice'>The maintenance panel is locked.</span>"
return
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
default_deconstruction_screwdriver(user, "[icon_state]_maintenance", "[initial(icon_state)]")
return
if(istype(W, /obj/item/weapon/crowbar))
if(panel_open)
default_deconstruction_crowbar()
return
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (!src.check_access(W))
user << "\red Access Denied."
user << "<span class='danger'>Access Denied.</span>"
return
if ((!src.locked) || (isnull(src.occupant)))
return
if ((src.occupant.health < -20) && (src.occupant.stat != 2))
user << "\red Access Refused."
user << "<span class='danger'>Access Refused.</span>"
return
else
src.locked = 0
@@ -264,6 +292,8 @@
set category = "Object"
set src in oview(1)
if(!usr)
return
if (usr.stat != 0)
return
src.go_out()
+2 -1
View File
@@ -22,7 +22,8 @@
/obj/item/toy/prize/seraph = 1,
/obj/item/toy/prize/mauler = 1,
/obj/item/toy/prize/odysseus = 1,
/obj/item/toy/prize/phazon = 1
/obj/item/toy/prize/phazon = 1,
/obj/item/toy/cards = 2
)
/obj/machinery/computer/arcade/New()
+18 -17
View File
@@ -49,7 +49,7 @@
/obj/machinery/constructable_frame/machine_frame/attackby(obj/item/P as obj, mob/user as mob)
if(P.crit_fail)
user << "\red This part is faulty, you cannot add this to the machine!"
user << "<span class='danger'>This part is faulty, you cannot add this to the machine!</span>"
return
switch(state)
if(1)
@@ -57,17 +57,17 @@
var/obj/item/weapon/cable_coil/C = P
if(C.amount >= 5)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "\blue You start to add cables to the frame."
user << "<span class='notice'>You start to add cables to the frame.</span>"
if(do_after(user, 20))
if(C)
C.amount -= 5
if(!C.amount) del(C)
user << "\blue You add cables to the frame."
user << "<span class='notice'>You add cables to the frame.</span>"
state = 2
icon_state = "box_1"
if(istype(P, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
user << "\blue You dismantle the frame"
user << "<span class='notice'>You dismantle the frame.</span>"
new /obj/item/stack/sheet/metal(src.loc, 5)
del(src)
if(2)
@@ -75,7 +75,7 @@
var/obj/item/weapon/circuitboard/B = P
if(B.board_type == "machine")
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "\blue You add the circuit board to the frame."
user << "<span class='notice'>You add the circuit board to the frame.</span>"
circuit = P
user.drop_item()
P.loc = src
@@ -86,10 +86,10 @@
update_namelist()
update_req_desc()
else
user << "\red This frame does not accept circuit boards of this type!"
user << "<span class='danger'>This frame does not accept circuit boards of this type!</span>"
if(istype(P, /obj/item/weapon/wirecutters))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
user << "\blue You remove the cables."
user << "<span class='notice'>You remove the cables.</span>"
state = 1
icon_state = "box_0"
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc )
@@ -102,9 +102,9 @@
circuit.loc = src.loc
circuit = null
if(components.len == 0)
user << "\blue You remove the circuit board."
user << "<span class='notice'>You remove the circuit board.</span>"
else
user << "\blue You remove the circuit board and other components."
user << "<span class='notice'>You remove the circuit board and other components.</span>"
for(var/obj/item/weapon/W in components)
W.loc = src.loc
desc = initial(desc)
@@ -125,32 +125,33 @@
del(O)
new_machine.component_parts = list()
for(var/obj/O in src)
O.loc = new_machine
O.loc = null
new_machine.component_parts += O
circuit.loc = new_machine
circuit.loc = null
new_machine.RefreshParts()
del(src)
if(istype(P, /obj/item/weapon))
var/success
for(var/I in req_components)
if(istype(P, text2path(I)) && (req_components[I] > 0))
success=1
if(istype(P, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/CP = P
if(CP.amount > 1)
var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src)
CC.amount = 1
var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src, 1, CP.item_color)
if(CP.use(1))
components += CC
req_components[I]--
update_req_desc()
break
break
user.drop_item()
P.loc = src
components += P
req_components[I]--
update_req_desc()
break
if(P.loc != src && !istype(P, /obj/item/weapon/cable_coil))
user << "\red You cannot add that component to the machine!"
if(!success)
user << "<span class='danger'>You cannot add that to the machine!</span>"
//Machine Frame Circuit Boards
+2 -2
View File
@@ -764,7 +764,7 @@ About the new airlock wires panel:
usr << text("The door is already electrified. You can't re-electrify it while it's already electrified.<br>\n")
else
shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Electrified the [name] at [x] [y] [z]</font>")
add_logs(usr, src, "electrified", admin=0, addition="at [x],[y],[z]")
src.secondsElectrified = 30
spawn(10)
while (src.secondsElectrified>0)
@@ -783,7 +783,7 @@ About the new airlock wires panel:
usr << text("The door is already electrified. You can't re-electrify it while it's already electrified.<br>\n")
else
shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Electrified the [name] at [x] [y] [z]</font>")
add_logs(usr, src, "electrified", admin=0, addition="at [x],[y],[z]")
src.secondsElectrified = -1
if (8) // Not in order >.>
+1 -3
View File
@@ -153,9 +153,7 @@
src.occupant.reagents.trans_to (newmeat, round (sourcetotalreagents / totalslabs, 1)) // Transfer all the reagents from the
allmeat[i] = newmeat
src.occupant.attack_log += "\[[time_stamp()]\] Was gibbed by <b>[user]/[user.ckey]</b>" //One shall not simply gib a mob unnoticed!
user.attack_log += "\[[time_stamp()]\] Gibbed <b>[src.occupant]/[src.occupant.ckey]</b>"
log_attack("\[[time_stamp()]\] <b>[user]/[user.ckey]</b> gibbed <b>[src.occupant]/[src.occupant.ckey]</b>")
add_logs(user, occupant, "gibbed")
src.occupant.death(1)
src.occupant.ghostize()
del(src.occupant)
+23 -2
View File
@@ -108,6 +108,7 @@ Class Procs:
var/uid
var/manual = 0
var/global/gl_uid = 1
var/panel_open = 0
/obj/machinery/New()
..()
@@ -211,7 +212,7 @@ Class Procs:
if ( ! (istype(usr, /mob/living/carbon/human) || \
istype(usr, /mob/living/silicon) || \
istype(usr, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
usr << "\red You don't have the dexterity to do this!"
usr << "<span class='danger'>You don't have the dexterity to do this!</span>"
return 1
/*
//distance checks are made by atom/proc/DblClick
@@ -224,7 +225,7 @@ Class Procs:
visible_message("\red [H] stares cluelessly at [src] and drools.")
return 1
else if(prob(H.getBrainLoss()))
user << "\red You momentarily forget how to use [src]."
user << "<span class='danger'>You momentarily forget how to use [src].</span>"
return 1
src.add_fingerprint(user)
@@ -238,3 +239,23 @@ Class Procs:
uid = gl_uid
gl_uid++
/obj/machinery/proc/default_deconstruction_crowbar()
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
del(src)
/obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/icon_state_open, var/icon_state_closed)
if (!panel_open)
panel_open = 1
icon_state = icon_state_open
user << "<span class='notice'>You open the maintenance hatch of [src].</span>"
else
panel_open = 0
icon_state = icon_state_closed
user << "<span class='notice'>You close the maintenance hatch of [src].</span>"
@@ -24,26 +24,26 @@
switch(construct_op)
if(0)
if(istype(P, /obj/item/weapon/screwdriver))
user << "You unfasten the bolts."
user << "<span class='notice'>You unfasten the bolts.</span>"
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
construct_op ++
if(1)
if(istype(P, /obj/item/weapon/screwdriver))
user << "You fasten the bolts."
user << "<span class='notice'>You fasten the bolts.</span>"
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
construct_op --
if(istype(P, /obj/item/weapon/wrench))
user << "You dislodge the external plating."
user << "<span class='notice'>You dislodge the external plating.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
construct_op ++
if(2)
if(istype(P, /obj/item/weapon/wrench))
user << "You secure the external plating."
user << "<span class='notice'>You secure the external plating.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
construct_op --
if(istype(P, /obj/item/weapon/wirecutters))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
user << "You remove the cables."
user << "<span class='notice'>You remove the cables.</span>"
construct_op ++
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( user.loc )
A.amount = 5
@@ -51,26 +51,25 @@
if(3)
if(istype(P, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/A = P
if(A.amount >= 5)
user << "You insert the cables."
A.amount -= 5
if(A.amount <= 0)
user.drop_item()
del(A)
if(A.use(5))
user << "<span class='notice'>You insert the cables.</span>"
construct_op --
stat &= ~BROKEN // the machine's not borked anymore!
else
user << "You need more cable"
user << "<span class='danger'>You need more cable to do that.</span>"
if(istype(P, /obj/item/weapon/crowbar))
user << "You begin prying out the circuit board and components..."
user << "<span class='notice'>You begin prying out the circuit board and components...</span>"
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
if(do_after(user,60))
user << "You finish prying out the components."
user << "<span class='notice'>You finish prying out the components.</span>"
// Drop all the component stuff
if(contents.len > 0)
for(var/obj/x in src)
x.loc = user.loc
if(component_parts)
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
else
// If the machine wasn't made during runtime, probably doesn't have components:
@@ -81,13 +80,14 @@
for(var/i = 1, i <= C.req_components[I], i++)
newpath = text2path(I)
var/obj/item/s = new newpath
s.loc = user.loc
if(istype(P, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/A = P
s.loc = src.loc
if(istype(s, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/A = s
A.amount = 1
A.update_icon()
// Drop a circuit board too
C.loc = user.loc
C.loc = src.loc
// Create a machine frame and delete the current machine
var/obj/machinery/constructable_frame/machine_frame/F = new
+1 -1
View File
@@ -408,7 +408,7 @@
if(M.melee_damage_upper == 0) return
if(!(stat & BROKEN))
visible_message("\red <B>[M] [M.attacktext] [src]!</B>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
add_logs(M, src, "attacked", admin=0)
//src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
src.health -= M.melee_damage_upper
if (src.health <= 0)
-1
View File
@@ -40,7 +40,6 @@
var/shoot_inventory = 0 //Fire items at customers! We're broken!
var/shut_up = 0 //Stop spouting those godawful pitches!
var/extended_inventory = 0 //can we access the hidden inventory?
var/panel_open = 0 //Hacking that vending machine. Gonna get a free candy bar.
var/scan_id = 1
var/obj/item/weapon/coin/coin
var/datum/wires/vending/wires = null
+1 -3
View File
@@ -79,9 +79,7 @@
M.updatehealth()
src.occupant_message("You hit [target].")
src.visible_message("<font color='red'><b>[src.name] hits [target].</b></font>")
occupant.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [occupant.name] ([occupant.ckey]) with [name] (INTENT: [uppertext(occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
log_attack("<font color='red'>[occupant.name] ([occupant.ckey]) attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(occupant.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>" )
add_logs(occupant, M, "attacked", object=src, addition="(INTENT: [uppertext(occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])")
else
step_away(M,src)
src.occupant_message("You push [target] out of the way.")
@@ -195,9 +195,7 @@
if(to_inject && occupant.reagents.get_reagent_amount(R.id) + to_inject <= inject_amount*2)
occupant_message("Injecting [occupant] with [to_inject] units of [R.name].")
log_message("Injecting [occupant] with [to_inject] units of [R.name].")
occupant.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been injected with [name] ([R] - [to_inject] units) by [chassis.occupant.name] ([chassis.occupant.ckey])</font>"
chassis.occupant.attack_log += "\[[time_stamp()]\] <font color='red'>Used the [name] ([R] - [to_inject] units) to inject [occupant.name] ([occupant.ckey])</font>"
log_attack("<font color='red'>[chassis.occupant.name] ([chassis.occupant.ckey]) used the [name] ([R] - [to_inject] units) to inject [occupant.name] ([occupant.ckey])</font>")
add_logs(chassis.occupant, occupant, "injected", object="[name] ([R] - [to_inject] units)")
SG.reagents.trans_id_to(occupant,R.id,to_inject)
update_equip_info()
return
@@ -468,8 +466,6 @@
S.icon_state = "syringeproj"
playsound(chassis, 'sound/items/syringeproj.ogg', 50, 1)
log_message("Launched [S] from [src], targeting [target].")
var/O = "[chassis.occupant]"
var/C = "[chassis.occupant.ckey]"
var/mob/originaloccupant = chassis.occupant
spawn(-1)
src = null //if src is deleted, still process the syringe
@@ -492,10 +488,7 @@
S.reagents.trans_to(M, S.reagents.total_volume)
M.take_organ_damage(2)
S.visible_message("<span class=\"attack\"> [M] was hit by the syringe!</span>")
M.attack_log += "\[[time_stamp()]\] <b>[O]/[C]</b> shot <b>[M]/[M.ckey]</b> with a <b>syringegun</b> ([R])"
if(originaloccupant)
originaloccupant.attack_log += "\[[time_stamp()]\] <b>[originaloccupant]/[originaloccupant.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>syringegun</b> ([R])"
log_attack("<font color='red'>[O] ([C]) shot [M] ([M.ckey]) with a syringegun ([R])</font>")
add_logs(originaloccupant, M, "shot", object="syringegun")
break
else if(S.loc == trg)
S.icon_state = initial(S.icon_state)
+3 -9
View File
@@ -54,9 +54,7 @@
M.updatehealth()
occupant_message("\red You squeeze [target] with [src.name]. Something cracks.")
chassis.visible_message("\red [chassis] squeezes [target].")
chassis.occupant.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [chassis.occupant.name] ([chassis.occupant.ckey]) with [name] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
log_attack("<font color='red'>[chassis.occupant.name] ([chassis.occupant.ckey]) attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>" )
add_logs(chassis.occupant, M, "attacked", object="[name]", addition="(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])")
else
step_away(M,chassis)
occupant_message("You push [target] out of the way.")
@@ -115,9 +113,7 @@
log_message("Drilled through [target]")
if(ismob(target))
var/mob/M = target
chassis.occupant.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [chassis.occupant.name] ([chassis.occupant.ckey]) with [name] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
log_attack("<font color='red'>[chassis.occupant.name] ([chassis.occupant.ckey]) attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>" )
add_logs(chassis.occupant, M, "attacked", object="[name]", addition="(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])")
target.ex_act(2)
return 1
@@ -177,9 +173,7 @@
log_message("Drilled through [target]")
if(ismob(target))
var/mob/M = target
chassis.occupant.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [chassis.occupant.name] ([chassis.occupant.ckey]) with [name] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
log_attack("<font color='red'>[chassis.occupant.name] ([chassis.occupant.ckey]) attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>" )
add_logs(chassis.occupant, M, "attacked", object="[name]", addition="(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])")
target.ex_act(2)
return 1
+1 -7
View File
@@ -84,13 +84,7 @@
src.life -= 10
if(ismob(A))
var/mob/M = A
if(istype(firer, /mob))
M.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
log_attack("<font color='red'>[firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src]</font>")
else
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
log_attack("<font color='red'>UNKNOWN shot [M] ([M.ckey]) with a [src]</font>")
add_logs(firer, M, "shot", object="[src]")
if(life <= 0)
del(src)
return
+4 -19
View File
@@ -34,7 +34,6 @@
var/list/queue = list()
var/processing_queue = 0
var/screen = "main"
var/opened = 0
var/temp
var/list/part_sets = list( //set names must be unique
"Cyborg"=list(
@@ -701,25 +700,11 @@
/obj/machinery/mecha_part_fabricator/attackby(obj/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/screwdriver))
if (!opened)
opened = 1
icon_state = "fab-o"
user << "You open the maintenance hatch of [src]."
else
opened = 0
icon_state = "fab-idle"
user << "You close the maintenance hatch of [src]."
default_deconstruction_screwdriver(user, "fab-o", "fab-idle")
return
if (opened)
if (panel_open)
if(istype(W, /obj/item/weapon/crowbar))
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
if(src.resources["metal"] >= 3750)
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
G.amount = round(src.resources["metal"] / G.perunit)
@@ -744,7 +729,7 @@
if(src.resources["bananium"] >= 2000)
var/obj/item/stack/sheet/mineral/clown/G = new /obj/item/stack/sheet/mineral/clown(src.loc)
G.amount = round(src.resources["bananium"] / G.perunit)
del(src)
default_deconstruction_crowbar()
return 1
else
user << "\red You can't load the [src.name] while it's opened."
+2 -2
View File
@@ -458,13 +458,13 @@
src.take_damage(damage)
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
visible_message("\red <B>[user]</B> [user.attacktext] [src]!")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
add_logs(user, src, "attacked", admin=0)
else
src.log_append_to_last("Armor saved.")
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
src.occupant_message("\blue The [user]'s attack is stopped by the armor.")
visible_message("\blue The [user] rebounds off [src.name]'s armor!")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
add_logs(user, src, "attacked", admin=0)
return
/obj/mecha/attack_tk()
+2 -5
View File
@@ -195,7 +195,7 @@
rejections += I.type // therefore full bags are still a little spammy
failure = 1
continue
success = 1
S.handle_item_insertion(I, 1) //The 1 stops the "You put the [src] into [S]" insertion message from being displayed.
if(success && !failure)
@@ -488,10 +488,7 @@
user << "\red You cannot locate any eyes on this creature!"
return
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
log_attack("<font color='red'> [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
add_logs(user, M, "attacked", object="[src.name]", addition="(INTENT: [uppertext(user.a_intent)])")
src.add_fingerprint(user)
//if((CLUMSY in user.mutations) && prob(50))
+1 -5
View File
@@ -14,11 +14,7 @@
if(!istype(M, /mob/living/silicon/ai))//If target is not an AI.
return ..()
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been carded with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to card [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) used the [src.name] to card [M.name] ([M.ckey])</font>")
add_logs(user, M, "carded", object="[src.name]")
transfer_ai("AICORE", "AICARD", M, user)
return
+1 -4
View File
@@ -40,11 +40,8 @@
/obj/item/device/flash/attack(mob/living/M, mob/user)
if(!user || !M) return //sanity
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been flashed (attempt) with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to flash [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) Used the [src.name] to flash [M.name] ([M.ckey])</font>")
add_logs(user, M, "flashed", object="[src.name]")
if(!clown_check(user)) return
if(broken)
@@ -235,9 +235,7 @@
"<span class='userdanger'>[user] blinks \the [src] at \the [A].")
if(ismob(A))
var/mob/M = A
M.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> attacked <b>[M]/[M.ckey]</b> with an <b>EMP-light</b>"
user.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> attacked <b>[M]/[M.ckey]</b> with an <b>EMP-light</b>"
log_attack("<font color='red'>[user] ([user.ckey]) attacked [M] ([M.ckey]) with an EMP-light</font>")
add_logs(user, M, "attacked", object="EMP-light")
emp_charges -= 1
else
user << "<span class='warning'>The [src] is out of charges!</span>"
@@ -73,9 +73,7 @@
//20% chance to actually hit the eyes
if(prob(20))
C.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had a laser pointer shone in their eyes by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='orange'>Shone a laser pointer in the eyes of [C.name] ([C.ckey])</font>")
log_attack("<font color='orange'>[user.name] ([user.ckey]) Shone a laser pointer in the eyes of [C.name] ([C.ckey])</font>")
add_logs(user, C, "shone in the eyes", object="laser pointer")
//eye target check
outmsg = "<span class='notice'>You blind [C] by shining [src] in their eyes.</span>"
@@ -127,10 +125,7 @@
S.Weaken(rand(5,10))
S << "<span class='warning'>Your sensors were overloaded by a laser!</span>"
outmsg = "<span class='notice'>You overload [S] by shining [src] at their sensors.</span>"
S.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had a laser pointer shone in their eyes by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='orange'>Shone a laser pointer in the eyes of [S.name] ([S.ckey])</font>")
log_attack("<font color='orange'>[user.name] ([user.ckey]) Shone a laser pointer in the eyes of [S.name] ([S.ckey])</font>")
add_logs(user, S, "shone in the sensors", object="laser pointer")
else
outmsg = "<span class='notice'>You fail to overload [S] by shining [src] at their sensors.</span>"
@@ -140,9 +135,7 @@
if(prob(20))
C.emp_act(1)
outmsg = "<span class='notice'>You hit the lens of [C] with [src], temporarily disabling the camera!</span>"
log_admin("\[[time_stamp()]\] [user.name] ([user.ckey]) EMPd a camera with a laser pointer")
user.attack_log += text("\[[time_stamp()]\] [user.name] ([user.ckey]) EMPd a camera with a laser pointer")
add_logs(user, C, "EMPed", object="laser pointer")
else
outmsg = "<span class='info'>You missed the lens of [C] with [src].</span>"
@@ -36,7 +36,7 @@ effective or pretty fucking useless.
user << "\red The mind batterer has been burnt out!"
return
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used [src] to knock down people in the area.</font>")
add_logs(user, null, "knocked down people in the area", admin=0, object="[src]")
for(var/mob/living/carbon/human/M in orange(10, user))
spawn()
@@ -10,10 +10,6 @@
icon_state = "shock"
attack(mob/M as mob, mob/living/silicon/robot/user as mob)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_attack(" <font color='red'>[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey])</font>")
user.cell.charge -= 30
+302 -1
View File
@@ -556,5 +556,306 @@
cooldown = 1
spawn(30) cooldown = 0
return
..()
/*
|| A Deck of Cards for playing various games of chance ||
*/
obj/item/toy/cards
name = "deck of cards"
desc = "A deck of space-grade playing cards."
icon = 'icons/obj/toy.dmi'
icon_state = "deck_full"
var/list/cards = list()
obj/item/toy/cards/New()
..()
for(var/i = 2; i <= 10; i++)
cards += "[i] of Hearts"
cards += "[i] of Spades"
cards += "[i] of Clubs"
cards += "[i] of Diamonds"
cards += "King of Hearts"
cards += "King of Spades"
cards += "King of Clubs"
cards += "King of Diamonds"
cards += "Queen of Hearts"
cards += "Queen of Spades"
cards += "Queen of Clubs"
cards += "Queen of Diamonds"
cards += "Jack of Hearts"
cards += "Jack of Spades"
cards += "Jack of Clubs"
cards += "Jack of Diamonds"
cards += "Ace of Hearts"
cards += "Ace of Spades"
cards += "Ace of Clubs"
cards += "Ace of Diamonds"
obj/item/toy/cards/attack_hand(mob/user as mob)
var/choice = null
if(cards.len == 0)
src.icon_state = "deck_empty"
user << "<span class='notice'>There are no more cards to draw.</span>"
return
var/obj/item/toy/singlecard/H = new/obj/item/toy/singlecard(user.loc)
choice = cards[1]
H.cardname = choice
H.parentdeck = src
src.cards -= choice
H.pickup(user)
user.put_in_active_hand(H)
src.visible_message("<span class='notice'>[user] draws a card from the deck.</span>", "<span class='notice'>You draw a card from the deck.</span>")
if(cards.len > 26)
src.icon_state = "deck_full"
else if(cards.len > 10)
src.icon_state = "deck_half"
else if(cards.len > 1)
src.icon_state = "deck_low"
obj/item/toy/cards/attack_self(mob/user as mob)
cards = shuffle(cards)
playsound(user, 'sound/items/cardshuffle.ogg', 50, 1)
user.visible_message("<span class='notice'>[user] shuffles the deck.</span>", "<span class='notice'>You shuffle the deck.</span>")
obj/item/toy/cards/attackby(obj/item/toy/singlecard/C, mob/living/user)
..()
if(istype(C))
if(C.parentdeck == src)
src.cards += C.cardname
user.u_equip(C)
user.visible_message("<span class='notice'>[user] adds a card to the bottom of the deck.</span>","<span class='notice'>You add the card to the bottom of the deck.</span>")
del(C)
else
user << "<span class='notice'>You can't mix cards from other decks.</span>"
if(cards.len > 26)
src.icon_state = "deck_full"
else if(cards.len > 10)
src.icon_state = "deck_half"
else if(cards.len > 1)
src.icon_state = "deck_low"
obj/item/toy/cards/attackby(obj/item/toy/cardhand/C, mob/living/user)
..()
if(istype(C))
if(C.parentdeck == src)
src.cards += C.currenthand
user.u_equip(C)
user.visible_message("<span class='notice'>[user] puts their hand of cards in the deck.</span>", "<span class='notice'>You put the hand of cards in the deck.</span>")
del(C)
else
user << "<span class='notice'>You can't mix cards from other decks.</span>"
if(cards.len > 26)
src.icon_state = "deck_full"
else if(cards.len > 10)
src.icon_state = "deck_half"
else if(cards.len > 1)
src.icon_state = "deck_low"
obj/item/toy/cards/MouseDrop(atom/over_object)
var/mob/M = usr
if(usr.stat || !ishuman(usr) || !usr.canmove || usr.restrained())
return
if(Adjacent(usr))
if(over_object == M)
M.put_in_hands(src)
usr << "<span class='notice'>You pick up the deck.</span>"
else if(istype(over_object, /obj/screen))
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.put_in_r_hand(src)
usr << "<span class='notice'>You pick up the deck.</span>"
if("l_hand")
M.u_equip(src)
M.put_in_l_hand(src)
usr << "<span class='notice'>You pick up the deck.</span>"
else
usr<< "<span class='notice'>You can't reach it from here.</span>"
obj/item/toy/cardhand
name = "hand of cards"
desc = "A number of cards not in a deck, customarily held in ones hand."
icon = 'icons/obj/toy.dmi'
icon_state = "hand2"
var/list/currenthand = list()
var/obj/item/toy/cards/parentdeck = null
var/choice = null
obj/item/toy/cardhand/attack_self(mob/user as mob)
user.set_machine(src)
interact(user)
obj/item/toy/cardhand/interact(mob/user)
var/dat = "You have:<BR>"
for(var/t in currenthand)
dat += "<A href='?src=\ref[src];pick=[t]'>A [t].</A><BR>"
dat += "Which card will you remove next?"
var/datum/browser/popup = new(user, "cardhand", "Hand of Cards", 400, 240)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.set_content(dat)
popup.open()
obj/item/toy/cardhand/Topic(href, href_list)
if(..())
return
if(usr.stat || !ishuman(usr) || !usr.canmove)
return
var/mob/living/carbon/human/cardUser = usr
if(href_list["pick"])
if (cardUser.get_item_by_slot(slot_l_hand) == src || cardUser.get_item_by_slot(slot_r_hand) == src)
var/choice = href_list["pick"]
var/obj/item/toy/singlecard/C = new/obj/item/toy/singlecard(cardUser.loc)
src.currenthand -= choice
C.parentdeck = src.parentdeck
C.cardname = choice
C.pickup(cardUser)
cardUser.put_in_any_hand_if_possible(C)
cardUser.visible_message("<span class='notice'>[cardUser] draws a card from \his hand.</span>", "<span class='notice'>You take the [C.cardname] from your hand.</span>")
interact(cardUser)
if(src.currenthand.len < 3)
src.icon_state = "hand2"
else if(src.currenthand.len < 4)
src.icon_state = "hand3"
else if(src.currenthand.len < 5)
src.icon_state = "hand4"
if(src.currenthand.len == 1)
var/obj/item/toy/singlecard/N = new/obj/item/toy/singlecard(src.loc)
N.parentdeck = src.parentdeck
N.cardname = src.currenthand[1]
cardUser.u_equip(src)
N.pickup(cardUser)
cardUser.put_in_any_hand_if_possible(N)
cardUser << "<span class='notice'>You also take [currenthand[1]] and hold it.</span>"
cardUser << browse(null, "window=cardhand")
del(src)
return
obj/item/toy/cardhand/attackby(obj/item/toy/singlecard/C, mob/living/user)
if(istype(C))
if(C.parentdeck == src.parentdeck)
src.currenthand += C.cardname
user.u_equip(C)
user.visible_message("<span class='notice'>[user] adds a card to their hand.</span>", "<span class='notice'>You add the [C.cardname] to your hand.</span>")
interact(user)
if(currenthand.len > 4)
src.icon_state = "hand5"
else if(currenthand.len > 3)
src.icon_state = "hand4"
else if(currenthand.len > 2)
src.icon_state = "hand3"
del(C)
else
user << "<span class='notice'>You can't mix cards from other decks.</span>"
obj/item/toy/singlecard
name = "card"
desc = "a card"
icon = 'icons/obj/toy.dmi'
icon_state = "singlecard_down"
var/cardname = null
var/obj/item/toy/cards/parentdeck = null
var/flipped = 0
pixel_x = -5
obj/item/toy/singlecard/examine()
set src in usr.contents
if(ishuman(usr))
var/mob/living/carbon/human/cardUser = usr
if(cardUser.get_item_by_slot(slot_l_hand) == src || cardUser.get_item_by_slot(slot_r_hand) == src)
cardUser.visible_message("<span class='notice'>[cardUser] checks \his card.</span>", "<span class='notice'>The card reads: [src.cardname]</span>")
else
cardUser << "<span class='notice'>You need to have the card in your hand to check it.</span>"
obj/item/toy/singlecard/verb/Flip()
set name = "Flip Card"
set category = "Object"
set src in range(1)
if(usr.stat || !ishuman(usr) || !usr.canmove || usr.restrained())
return
if(!flipped)
src.flipped = 1
if (cardname)
src.icon_state = "sc_[cardname]"
src.name = src.cardname
else
src.icon_state = "sc_Ace of Spades"
src.name = "What Card"
src.pixel_x = 5
else if(flipped)
src.flipped = 0
src.icon_state = "singlecard_down"
src.name = "card"
src.pixel_x = -5
obj/item/toy/singlecard/attackby(obj/item/I, mob/living/user)
if(istype(I, /obj/item/toy/singlecard/))
var/obj/item/toy/singlecard/C = I
if(C.parentdeck == src.parentdeck)
var/obj/item/toy/cardhand/H = new/obj/item/toy/cardhand(user.loc)
H.currenthand += C.cardname
H.currenthand += src.cardname
H.parentdeck = C.parentdeck
user.u_equip(C)
H.pickup(user)
user.put_in_active_hand(H)
user << "<span class='notice'>You combine the [C.cardname] and the [src.cardname] into a hand.</span>"
del(C)
del(src)
else
user << "<span class='notice'>You can't mix cards from other decks.</span>"
if(istype(I, /obj/item/toy/cardhand/))
var/obj/item/toy/cardhand/H = I
if(H.parentdeck == parentdeck)
H.currenthand += cardname
user.u_equip(src)
user.visible_message("<span class='notice'>[user] adds a card to \his hand.</span>", "<span class='notice'>You add the [cardname] to your hand.</span>")
H.interact(user)
if(H.currenthand.len > 4)
H.icon_state = "hand5"
else if(H.currenthand.len > 3)
H.icon_state = "hand4"
else if(H.currenthand.len > 2)
H.icon_state = "hand3"
del(src)
else
user << "<span class='notice'>You can't mix cards from other decks.</span>"
obj/item/toy/singlecard/attack_self(mob/user)
if(usr.stat || !ishuman(usr) || !usr.canmove || usr.restrained())
return
Flip()
@@ -44,10 +44,7 @@
if(!ishuman(user))
user << "<span class='notice'>You don't have the dexterity to do this!</span>"
return
target.attack_log += "\[[time_stamp()]\] <font color='orange'>[user.name] ([user.ckey]) attempted to inject with [name]</font>"
user.attack_log += "\[[time_stamp()]\] <font color='red'>Used the [name] to attempt to inject [target.name] ([target.ckey])</font>"
log_attack("<font color='red'>[user.name] ([user.ckey]) used the [name] to attempt to inject [target.name] ([target.ckey])</font>")
add_logs(user, target, "attempted to inject", object="[name]")
if(target != user)
target.visible_message("<span class='danger'>[user] is trying to inject [target] with [src]!</span>", "<span class='userdanger'>[user] is trying to inject [target] with [src]!</span>")
@@ -58,9 +55,7 @@
else
user << "<span class='notice'>You inject yourself with [src].</span>"
target.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>"
user.attack_log += "\[[time_stamp()]\] <font color='red'>Used the [name] to inject [target.name] ([target.ckey])</font>"
log_attack("<font color='red'>[user.name] ([user.ckey]) used the [name] to inject [target.name] ([target.ckey])</font>")
add_logs(user, target, "injected", object="[name]")
user.drop_item()
inject(target, user) //Now we actually do the heavy lifting.
@@ -60,8 +60,7 @@
return
user << "Planting explosives..."
if(ismob(target))
user.attack_log += "\[[time_stamp()]\] <font color='red'> [user.real_name] tried planting [name] on [target:real_name] ([target:ckey])</font>"
log_attack("<font color='red'> [user.real_name] ([user.ckey]) tried planting [name] on [target:real_name] ([target:ckey])</font>")
add_logs(user, target, "tried to plant explosives on", object="[name]")
user.visible_message("\red [user.name] is trying to plant some kind of explosive on [target.name]!")
@@ -71,7 +70,7 @@
loc = null
if (ismob(target))
target:attack_log += "\[[time_stamp()]\]<font color='orange'> Had the [name] planted on them by [user.real_name] ([user.ckey])</font>"
add_logs(user, target, "planted [name] on")
user.visible_message("\red [user.name] finished planting an explosive on [target.name]!")
target.overlays += image('icons/obj/assemblies.dmi', "plastic-explosive2")
+1 -4
View File
@@ -53,10 +53,7 @@
else
feedback_add_details("handcuffs","H")
C.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been handcuffed (attempt) by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to handcuff [C.name] ([C.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) Attempted to handcuff [C.name] ([C.ckey])</font>")
add_logs(user, C, "handcuffed")
/obj/item/weapon/handcuffs/cable
name = "cable restraints"
@@ -26,10 +26,7 @@
if(T && (M == user || do_after(user, 50)))
if(user && M && (get_turf(M) == T) && src && imp)
M.visible_message("<span class='warning'>[M] has been implanted by [user].</span>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'> Implanted with [name] ([imp.name]) by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] ([imp.name]) to implant [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) implanted [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)])</font>")
add_logs(user, M, "implanted", object="[name]")
user << "<span class='notice'>You implanted the implant into [M].</span>"
if(imp.implanted(M))
imp.loc = M
+2 -8
View File
@@ -165,10 +165,8 @@
user.take_organ_damage(10)
user.Paralyse(2)
return
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey])</font>")
add_logs(user, M, "attacked", object="[src.name]")
var/t = user:zone_sel.selecting
if (t == "head")
@@ -249,11 +247,7 @@
if (istype(location, /turf/simulated))
location.add_blood(H) ///Plik plik, the sound of blood
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey])</font>")
add_logs(user, M, "attacked", object="[src.name]")
if(prob(15))
M.Weaken(3)
@@ -39,10 +39,7 @@
else
user.take_organ_damage(2 * force)
return
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
add_logs(user, M, "attacked", object="[src.name]")
if(user.a_intent == "harm")
if(!..()) return
@@ -38,11 +38,7 @@
if(user.mind && (user.mind.assigned_role == "Chaplain"))
chaplain = 1
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
add_logs(user, M, "attacked", object="[src.name]")
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "\red You don't have the dexterity to do this!"
@@ -29,11 +29,7 @@
user.Paralyse(2)
return
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
add_logs(user, M, "attacked", object="[src.name]")
if (M.stat < 2 && M.health < 50 && prob(90))
var/mob/H = M
+1 -3
View File
@@ -137,9 +137,7 @@
var/mob/living/carbon/human/H = L
H.forcesay(hit_appends)
user.attack_log += "\[[time_stamp()]\]<font color='red'> Stunned [L.name] ([L.ckey]) with [name]</font>"
L.attack_log += "\[[time_stamp()]\]<font color='orange'> Stunned by [user.name] ([user.ckey]) with [name]</font>"
log_attack("<font color='red'>[user.name] ([user.ckey]) stunned [L.name] ([L.ckey]) with [name]</font>" )
add_logs(user, L, "stunned")
/obj/item/weapon/melee/baton/emp_act(severity)
if(bcell)
+2 -2
View File
@@ -91,7 +91,7 @@ BLIND // can't see anything
icon = 'icons/obj/clothing/suits.dmi'
name = "suit"
var/fire_resist = T0C+100
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
allowed = list(/obj/item/weapon/tank/emergency_oxygen)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
slot_flags = SLOT_OCLOTHING
@@ -123,7 +123,7 @@ BLIND // can't see anything
w_class = 4//bulky item
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.02
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | THICKMATERIAL
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen)
slowdown = 3
@@ -17,16 +17,9 @@
w_class = 4
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.02
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
slowdown = 1.5
armor = list(melee = 65, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
cold_protection = CHEST | GROIN | LEGS | FEET | ARMS | HANDS
min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT
//Deathsquad suit
@@ -74,7 +67,7 @@
icon_state = "santa"
item_state = "santa"
slowdown = 0
flags = FPRINT | TABLEPASS | ONESIZEFITSALL | STOPSPRESSUREDMAGE
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE
allowed = list(/obj/item) //for stuffing exta special presents
+2 -2
View File
@@ -16,7 +16,7 @@
icon_state = "armor"
item_state = "armor"
blood_overlay_type = "armor"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
/obj/item/clothing/suit/armor/hos
@@ -130,7 +130,7 @@
item_state = "reactiveoff"
blood_overlay_type = "armor"
slowdown = 1
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
/obj/item/clothing/suit/armor/reactive/IsShield()
+2 -2
View File
@@ -4,7 +4,7 @@
icon_state = "bio"
desc = "A hood that protects the head and face from biological comtaminants."
permeability_coefficient = 0.01
flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR|THICKMATERIAL
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
@@ -16,7 +16,7 @@
w_class = 4//bulky item
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.01
flags = FPRINT | TABLEPASS
flags = FPRINT | TABLEPASS | THICKMATERIAL
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
slowdown = 1.0
allowed = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/pen,/obj/item/device/flashlight/pen)
+1 -1
View File
@@ -86,7 +86,7 @@
desc = "This robe commands authority."
icon_state = "judge"
item_state = "judge"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
body_parts_covered = CHEST|GROIN|LEGS|ARMS
allowed = list(/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/spacecash)
flags_inv = HIDEJUMPSUIT
+5 -4
View File
@@ -21,7 +21,7 @@
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/extinguisher)
slowdown = 1.0
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
flags = FPRINT | TABLEPASS | ONESIZEFITSALL | STOPSPRESSUREDMAGE
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | THICKMATERIAL
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
cold_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
@@ -47,7 +47,7 @@
name = "bomb hood"
desc = "Use in case of bomb."
icon_state = "bombsuit"
flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR|THICKMATERIAL
armor = list(melee = 40, bullet = 0, laser = 20,energy = 10, bomb = 100, bio = 0, rad = 0)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
cold_protection = HEAD
@@ -64,7 +64,7 @@
w_class = 4//bulky item
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.01
flags = FPRINT | TABLEPASS
flags = FPRINT | TABLEPASS | THICKMATERIAL
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
slowdown = 2
armor = list(melee = 40, bullet = 0, laser = 20,energy = 10, bomb = 100, bio = 0, rad = 0)
@@ -93,7 +93,7 @@
name = "radiation hood"
icon_state = "rad"
desc = "A hood with radiation protective properties. Label: Made with lead, do not eat insulation"
flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR|THICKMATERIAL
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 100)
@@ -105,6 +105,7 @@
w_class = 4//bulky item
gas_transfer_coefficient = 0.90
permeability_coefficient = 0.50
flags = FPRINT | TABLEPASS | THICKMATERIAL
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen)
slowdown = 1.5
+14 -14
View File
@@ -3,7 +3,7 @@
icon_state = "black"
item_state = "bl_suit"
item_color = "black"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/color/blackf
name = "feminine black jumpsuit"
@@ -18,21 +18,21 @@
icon_state = "blue"
item_state = "b_suit"
item_color = "blue"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/color/green
name = "green jumpsuit"
icon_state = "green"
item_state = "g_suit"
item_color = "green"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/color/grey
name = "grey jumpsuit"
icon_state = "grey"
item_state = "gy_suit"
item_color = "grey"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/color/orange
name = "orange jumpsuit"
@@ -42,35 +42,35 @@
item_color = "orange"
has_sensor = 2
sensor_mode = 3
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/color/pink
name = "pink jumpsuit"
icon_state = "pink"
item_state = "p_suit"
item_color = "pink"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/color/red
name = "red jumpsuit"
icon_state = "red"
item_state = "r_suit"
item_color = "red"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/color/white
name = "white jumpsuit"
icon_state = "white"
item_state = "w_suit"
item_color = "white"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/color/yellow
name = "yellow jumpsuit"
icon_state = "yellow"
item_state = "y_suit"
item_color = "yellow"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/psyche
name = "psychedelic jumpsuit"
@@ -89,7 +89,7 @@
desc = "aqua"
icon_state = "aqua"
item_color = "aqua"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/purple
name = "purple jumpsuit"
@@ -121,14 +121,14 @@
desc = "lightbrown"
icon_state = "lightbrown"
item_color = "lightbrown"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/brown
name = "brown jumpsuit"
desc = "brown"
icon_state = "brown"
item_color = "brown"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/yellowgreen
name = "yellowgreen jumpsuit"
@@ -141,7 +141,7 @@
desc = "darkblue"
icon_state = "darkblue"
item_color = "darkblue"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/lightred
name = "lightred jumpsuit"
@@ -154,4 +154,4 @@
desc = "darkred"
icon_state = "darkred"
item_color = "darkred"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
+10 -10
View File
@@ -6,7 +6,7 @@
icon_state = "ba_suit"
item_state = "ba_suit"
item_color = "ba_suit"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/captain //Alright, technically not a 'civilian' but its better then giving a .dm file for a single define.
@@ -15,7 +15,7 @@
icon_state = "captain"
item_state = "caparmor"
item_color = "captain"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/cargo
@@ -32,7 +32,7 @@
icon_state = "cargotech"
item_state = "lb_suit"
item_color = "cargo"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/chaplain
@@ -41,7 +41,7 @@
icon_state = "chaplain"
item_state = "bl_suit"
item_color = "chapblack"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/chef
@@ -49,7 +49,7 @@
name = "chef's uniform"
icon_state = "chef"
item_color = "chef"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/clown
@@ -58,7 +58,7 @@
icon_state = "clown"
item_state = "clown"
item_color = "clown"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
fitted = 0
@@ -68,7 +68,7 @@
icon_state = "hop"
item_state = "b_suit"
item_color = "hop"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/hydroponics
@@ -78,7 +78,7 @@
item_state = "g_suit"
item_color = "hydroponics"
permeability_coefficient = 0.50
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/janitor
@@ -87,7 +87,7 @@
icon_state = "janitor"
item_color = "janitor"
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/lawyer
@@ -148,7 +148,7 @@
icon_state = "mime"
item_state = "mime"
item_color = "mime"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/miner
desc = "It's a snappy jumpsuit with a sturdy set of overalls. It is very dirty."
@@ -6,7 +6,7 @@
item_state = "g_suit"
item_color = "chief"
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 10)
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/atmospheric_technician
desc = "It's a jumpsuit worn by atmospheric technicians."
@@ -14,7 +14,7 @@
icon_state = "atmos"
item_state = "atmos_suit"
item_color = "atmos"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/engineer
desc = "It's an orange high visibility jumpsuit worn by engineers. It has minor radiation shielding."
@@ -23,7 +23,7 @@
item_state = "engi_suit"
item_color = "engine"
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 10)
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/roboticist
desc = "It's a slimming black with reinforced seams; great for industrial work."
+4 -4
View File
@@ -8,7 +8,7 @@
item_state = "g_suit"
item_color = "director"
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/scientist
desc = "It's made of a special fiber that provides minor protection against biohazards. It has markings that denote the wearer as a scientist."
@@ -18,7 +18,7 @@
item_color = "toxinswhite"
permeability_coefficient = 0.50
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 0, rad = 0)
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/chemist
@@ -50,7 +50,7 @@
item_color = "geneticswhite"
permeability_coefficient = 0.50
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/virologist
desc = "It's made of a special fiber that gives special protection against biohazards. It has a virologist rank stripe on it."
@@ -78,7 +78,7 @@
item_color = "medical"
permeability_coefficient = 0.50
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/medical/blue
name = "medical scrubs"
+4 -4
View File
@@ -16,7 +16,7 @@
item_state = "r_suit"
item_color = "warden"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/security
name = "security officer's jumpsuit"
@@ -25,7 +25,7 @@
item_state = "r_suit"
item_color = "secred"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/*
* Detective
@@ -37,7 +37,7 @@
item_state = "det"
item_color = "detective"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/*
* Head of Security
@@ -49,7 +49,7 @@
item_state = "r_suit"
item_color = "hosred"
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/*
* Jensen cosplay gear
+3 -3
View File
@@ -24,7 +24,7 @@
name = "amish suit"
icon_state = "sl_suit"
item_color = "sl_suit"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/roman
name = "roman armor"
@@ -40,7 +40,7 @@
icon_state = "waiter"
item_state = "waiter"
item_color = "waiter"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
/obj/item/clothing/under/rank/mailman
name = "mailman's jumpsuit"
@@ -115,7 +115,7 @@
desc = "A jumpsuit with owl wings. Photorealistic owl feathers! Twooooo!"
icon_state = "owl"
item_color = "owl"
flags = FPRINT | TABLEPASS | ONESIZEFITSALL
flags = FPRINT | TABLEPASS
fitted = 0
/obj/item/clothing/under/johnny
+18
View File
@@ -0,0 +1,18 @@
// Basically, cut the event frequency in half to simulate unluckiness.
/datum/round_event_control/fridaythethirteen
name = "Friday the 13th"
holidayID = "Friday the 13th"
typepath = /datum/round_event/fridaythethirteen
weight = -1
max_occurrences = 1
earliest_start = 0
/datum/round_event/fridaythethirteen/start()
//Very unlucky, cut the frequency of events in half.
events.frequency_lower /= 2
events.frequency_upper /= 2
/datum/round_event/fridaythethirteen/announce()
for(var/mob/living/L in player_list)
L << "<span class='warning'>You are feeling unlucky today.</span>"
+1 -1
View File
@@ -2544,7 +2544,7 @@ ________________________________________________________________________________
U.client.images += image(tempHud,target,"hudninja")
else//If we don't know what role they have but they have one.
U.client.images += image(tempHud,target,"hudunknown1")
else//If the silicon mob has no law datum, no inherent laws, or a law zero, add them to the hud.
else if(issilicon(target))//If the silicon mob has no law datum, no inherent laws, or a law zero, add them to the hud.
var/mob/living/silicon/silicon_target = target
if(!silicon_target.laws||(silicon_target.laws&&(silicon_target.laws.zeroth||!silicon_target.laws.inherent.len)))
if(isrobot(silicon_target))//Different icons for robutts and AI.
+1 -4
View File
@@ -70,10 +70,7 @@
if(!..()) return
if(istype(M, /mob/living))
M << "\red You are stunned by the powerful acid of the Deathnettle!"
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Had the [src.name] used on them by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] on [M.name] ([M.ckey])</font>")
log_attack("<font color='red'> [user.name] ([user.ckey]) used the [src.name] on [M.name] ([M.ckey])</font>")
add_logs(user, M, "attacked", object="[src.name]")
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
@@ -143,8 +143,7 @@
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
add_logs(M, src, "attacked", admin=0)
updatehealth()
+1 -2
View File
@@ -365,8 +365,7 @@
var/start_T_descriptor = "<font color='#6b5d00'>tile at [start_T.x], [start_T.y], [start_T.z] in area [get_area(start_T)]</font>"
var/end_T_descriptor = "<font color='#6b4400'>tile at [end_T.x], [end_T.y], [end_T.z] in area [get_area(end_T)]</font>"
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been thrown by [usr.name] ([usr.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]</font>")
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]</font>")
add_logs(usr, M, "thrown", admin=0, addition="from [start_T_descriptor] with the target [end_T_descriptor]")
if(!item) return //Grab processing has a chance of returning null
+18 -2
View File
@@ -237,8 +237,7 @@
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
add_logs(M, src, "attacked", admin=0)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
var/obj/item/organ/limb/affecting = get_organ(ran_zone(dam_zone))
@@ -465,3 +464,20 @@
xylophone = 1
spawn(1200)
xylophone = 0
/mob/living/carbon/human/can_inject(var/mob/user, var/error_msg, var/target_zone)
. = 1 // Default to returning true.
if(user && !target_zone)
target_zone = user.zone_sel.selecting
// If targeting the head, see if the head item is thin enough.
// If targeting anything else, see if the wear suit is thin enough.
switch(target_zone)
if("head")
if(head && head.flags & THICKMATERIAL)
. = 0
else
if(wear_suit && wear_suit.flags & THICKMATERIAL)
. = 0
if(!. && error_msg && user)
// Might need re-wording.
user << "<span class='alert'>There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"].</span>"
@@ -3,6 +3,7 @@
return
if((M != src) && check_shields(0, M.name))
add_logs(M, src, "attempted to touch")
visible_message("<span class='warning'>[M] attempted to touch [src]!</span>")
return 0
@@ -10,6 +11,8 @@
if("help")
if(health >= 0)
help_shake_act(M)
if(src != M)
add_logs(M, src, "shaked")
return 1
//CPR
@@ -21,6 +24,7 @@
return 0
if(cpr_time < world.time + 30)
add_logs(src, M, "CPRed")
visible_message("<span class='notice'>[M] is trying to perform CPR on [src]!</span>")
if(!do_mob(M, src))
return 0
@@ -35,6 +39,9 @@
if("grab")
if(M == src || anchored)
return 0
add_logs(M, src, "grabbed", addition="passively")
if(w_uniform)
w_uniform.add_fingerprint(M)
@@ -53,10 +60,7 @@
return 1
if("harm")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Punched [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been punched by [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[M.name] ([M.ckey]) punched [src.name] ([src.ckey])</font>")
add_logs(M, src, "punched")
var/attack_verb = "punch"
if(lying)
@@ -105,9 +109,7 @@
forcesay(hit_appends)
if("disarm")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been disarmed by [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[M.name] ([M.ckey]) disarmed [src.name] ([src.ckey])</font>")
add_logs(M, src, "disarmed")
if(w_uniform)
w_uniform.add_fingerprint(M)
@@ -60,7 +60,7 @@ emp_act
return -1 // complete projectile permutation
if(check_shields(P.damage, "the [P.name]"))
P.on_hit(src, 2)
P.on_hit(src, 2, def_zone)
return 2
return (..(P , def_zone))
@@ -318,8 +318,7 @@
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
add_logs(M, src, "attacked", admin=0)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
updatehealth()
@@ -845,7 +844,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
body_parts_covered = FULL_BODY
slowdown = 1.0
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
flags = FPRINT | TABLEPASS | ONESIZEFITSALL | STOPSPRESSUREDMAGE | ABSTRACT
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | ABSTRACT
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS | HEAD
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
cold_protection = CHEST | GROIN | LEGS | FEET | ARMS | HANDS | HEAD
@@ -254,8 +254,7 @@
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
add_logs(M, src, "attacked", admin=0)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
updatehealth()
+6 -7
View File
@@ -211,6 +211,9 @@
O.emp_act(severity)
..()
/mob/living/proc/can_inject()
return 1
/mob/living/proc/get_organ_target()
var/mob/shooter = src
var/t = shooter:zone_sel.selecting
@@ -245,13 +248,6 @@
src.updatehealth()
/mob/living/proc/revive()
if(stat == 2)
dead_mob_list -= src
living_mob_list += src
if(isanimal(src))
var/mob/living/simple_animal/A = src
A.health = A.maxHealth
return
setToxLoss(0)
setOxyLoss(0)
setCloneLoss(0)
@@ -281,6 +277,9 @@
C.reagents.clear_reagents()
for(var/datum/disease/D in viruses)
D.cure(0)
if(stat == 2)
dead_mob_list -= src
living_mob_list += src
stat = CONSCIOUS
update_fire()
regenerate_icons()
+2 -4
View File
@@ -50,7 +50,7 @@
return 2
if(!P.nodamage)
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone)
P.on_hit(src, absorb)
P.on_hit(src, absorb, def_zone)
return absorb
/mob/living/hitby(atom/movable/AM)//Standardization and logging -Sieve
@@ -71,9 +71,7 @@
var/client/assailant = directory[ckey(O.fingerprintslast)]
if(assailant && assailant.mob && istype(assailant.mob,/mob))
var/mob/M = assailant.mob
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with [O], last touched by [M.name] ([assailant.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [src.name] ([src.ckey]) with [O]</font>")
log_attack("<font color='red'>[src.name] ([src.ckey]) was hit by [O], last touched by [M.name] ([assailant.ckey])</font>")
add_logs(M, src, "hit", object="[O]")
//Mobs on Fire
/mob/living/proc/IgniteMob()
+1 -2
View File
@@ -438,8 +438,7 @@ var/list/ai_list = list()
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
add_logs(M, src, "attacked", admin=0)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
updatehealth()
@@ -719,8 +719,7 @@
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
add_logs(M, src, "attacked", admin=0)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
updatehealth()
@@ -109,6 +109,11 @@
/mob/living/silicon/proc/damage_mob(var/brute = 0, var/fire = 0, var/tox = 0)
return
/mob/living/silicon/can_inject(var/mob/user, var/error_msg)
if(error_msg)
user << "<span class='alert'>Their outer shell is too tough.</span>"
return 0
/mob/living/silicon/IsAdvancedToolUser()
return 1
@@ -99,8 +99,7 @@
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
O.show_message("<span class='attack'>\The <EM>[M]</EM> [M.attacktext] \the <EM>[src]</EM>!</span>", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
add_logs(M, src, "attacked", admin=0)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
@@ -252,8 +252,7 @@
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>\The [M]</B> [M.attacktext] [src]!", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
add_logs(M, src, "attacked", admin=0)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
@@ -486,4 +485,10 @@
/mob/living/simple_animal/IgniteMob()
return
/mob/living/simple_animal/ExtinguishMob()
return
return
/mob/living/simple_animal/revive()
health = maxHealth
if(stat == 2)
dead_mob_list -= src
living_mob_list += src
+1
View File
@@ -528,6 +528,7 @@ var/list/slot_equipment_priority = list( \
if ( !AM || !usr || src==AM || !isturf(src.loc) ) //if there's no person pulling OR the person is pulling themself OR the object being pulled is inside something: abort!
return
if (!( AM.anchored ))
AM.add_fingerprint(src)
// If we're pulling something then drop what we're currently pulling and pull this instead.
if(pulling)
+2 -6
View File
@@ -134,9 +134,7 @@
icon_state = "grabbed+1"
if(!affecting.buckled)
affecting.loc = assailant.loc
affecting.attack_log += "\[[time_stamp()]\] <font color='orange'>Has had their neck grabbed by [assailant.name] ([assailant.ckey])</font>"
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>Grabbed the neck of [affecting.name] ([affecting.ckey])</font>"
log_attack("<font color='red'>[assailant.name] ([assailant.ckey]) grabbed the neck of [affecting.name] ([affecting.ckey])</font>")
add_logs(assailant, affecting, "neck-grabbed")
hud.icon_state = "disarm/kill"
hud.name = "disarm/kill"
else
@@ -155,9 +153,7 @@
return
state = GRAB_KILL
assailant.visible_message("<span class='danger'>[assailant] has tightened \his grip on [affecting]'s neck!</span>")
affecting.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])</font>"
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>"
log_attack("<font color='red'>[assailant.name] ([assailant.ckey]) Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>")
add_logs(assailant, affecting, "strangled")
assailant.next_move = world.time + 10
affecting.losebreath += 1
+12 -36
View File
@@ -42,40 +42,16 @@
colour = "white"
/obj/item/weapon/pen/attack(mob/M, mob/user)
if(!ismob(M))
/obj/item/weapon/pen/attack(mob/living/M, mob/user)
if(!istype(M))
return
user << "<span class='warning'>You stab [M] with the pen.</span>"
M << "\red You feel a tiny prick!"
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stabbed with [name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to stab [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) Used the [name] to stab [M.name] ([M.ckey])</font>")
/*
* Sleepy Pens
*/
/obj/item/weapon/pen/sleepypen
desc = "It's a black ink pen with a sharp point and a carefully engraved \"Waffle Co.\""
origin_tech = "materials=2;syndicate=5"
/obj/item/weapon/pen/sleepypen/New()
create_reagents(30)
reagents.add_reagent("chloralhydrate", 22) //Used to be 100 sleep toxin //30 Chloral seems to be fatal, reducing it to 22.
..()
/obj/item/weapon/pen/sleepypen/attack(mob/M, mob/user)
if(!istype(M)) return
..()
if(reagents.total_volume)
if(M.reagents)
reagents.trans_to(M, 30) //used to be 150
if(M.can_inject(user, 1))
user << "<span class='warning'>You stab [M] with the pen.</span>"
M << "\red You feel a tiny prick!"
. = 1
add_logs(user, M, "stabbed", object="[name]")
/*
* Parapens
@@ -84,13 +60,13 @@
origin_tech = "materials=2;syndicate=5"
/obj/item/weapon/pen/paralysis/attack(mob/M, mob/user)
/obj/item/weapon/pen/paralysis/attack(mob/living/M, mob/user)
if(!istype(M)) return
..()
if(reagents.total_volume)
if(M.reagents)
reagents.trans_to(M, 50)
if(..())
if(reagents.total_volume)
if(M.reagents)
reagents.trans_to(M, 50)
/obj/item/weapon/pen/paralysis/New()
+13 -6
View File
@@ -24,7 +24,7 @@
var/maxcopies = 10 //how many copies can be copied at once- idea shamelessly stolen from bs12's copier!
var/greytoggle = "Greyscale"
var/mob/living/ass = null
var/busy = 0
/obj/machinery/photocopier/attack_ai(mob/user)
return attack_hand(user)
@@ -63,7 +63,7 @@
if(href_list["copy"])
if(copy)
for(var/i = 0, i < copies, i++)
if(toner > 0)
if(toner > 0 && !busy && copy)
var/obj/item/weapon/paper/c = new /obj/item/weapon/paper (loc)
if(toner > 10) //lots of toner, make it dark
c.info = "<font color = #101010>"
@@ -78,13 +78,15 @@
c.fields = copy.fields
c.updateinfolinks()
toner--
busy = 1
sleep(15)
busy = 0
else
break
updateUsrDialog()
else if(photocopy)
for(var/i = 0, i < copies, i++)
if(toner >= 5) //Was set to = 0, but if there was say 3 toner left and this ran, you would get -2 which would be weird for ink
if(toner >= 5 && !busy && photocopy) //Was set to = 0, but if there was say 3 toner left and this ran, you would get -2 which would be weird for ink
var/obj/item/weapon/photo/p = new /obj/item/weapon/photo (loc)
var/icon/I = icon(photocopy.icon, photocopy.icon_state)
var/icon/img = icon(photocopy.img)
@@ -109,8 +111,9 @@
p.pixel_x = rand(-10, 10)
p.pixel_y = rand(-10, 10)
p.blueprints = photocopy.blueprints //a copy of a picture is still good enough for the syndicate
busy = 1
sleep(15)
busy = 0
else
break
else if(ass) //ASS COPY. By Miauw
@@ -118,7 +121,7 @@
var/icon/temp_img
if(ishuman(ass) && (ass.get_item_by_slot(slot_w_uniform) || ass.get_item_by_slot(slot_wear_suit)))
usr << "<span class='notice'>You feel kind of silly copying [ass == usr ? "your" : ass][ass == usr ? "" : "\'s"] ass with [ass == usr ? "your" : "their"] clothes on.</span>"
else if(toner >= 5 && check_ass()) //You have to be sitting on the copier and either be a xeno or a human without clothes on.
else if(toner >= 5 && !busy && check_ass()) //You have to be sitting on the copier and either be a xeno or a human without clothes on.
if(isalien(ass) || istype(ass,/mob/living/simple_animal/hostile/alien)) //Xenos have their own asses, thanks to Pybro.
temp_img = icon("icons/ass/assalien.png")
else if(ishuman(ass)) //Suit checks are in check_ass
@@ -141,7 +144,9 @@
ic.Blend(small_img,ICON_OVERLAY, 10, 13)
p.icon = ic
toner -= 5
busy = 1
sleep(15)
busy = 0
else
break
updateUsrDialog()
@@ -176,7 +181,7 @@
updateUsrDialog()
else if(href_list["aipic"])
if(!istype(usr,/mob/living/silicon/ai)) return
if(toner >= 5)
if(toner >= 5 && !busy)
var/list/nametemp = list()
var/find
var/datum/picture/selection
@@ -201,7 +206,9 @@
p.pixel_x = rand(-10, 10)
p.pixel_y = rand(-10, 10)
toner -= 5 //AI prints color pictures only, thus they can do it more efficiently
busy = 1
sleep(15)
busy = 0
updateUsrDialog()
else if(href_list["colortoggle"])
if(greytoggle == "Greyscale")
+2 -2
View File
@@ -302,8 +302,8 @@
if(src.amount < used)
return 0
else if (src.amount == used)
//handle mob icon update
if(ismob(loc))
.=1 //Because del(src) stops the proc, set the default return value to 1
if(ismob(loc)) //handle mob icon update
var/mob/M = loc
M.u_equip(src)
del(src)
+6 -14
View File
@@ -53,7 +53,6 @@ display round(lastgen) and plasmatank amount
var/active = 0
var/power_gen = 5000
var/open = 0
var/recent_fault = 0
var/power_output = 1
@@ -115,8 +114,8 @@ display round(lastgen) and plasmatank amount
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
component_parts += new /obj/item/weapon/cable_coil(src)
component_parts += new /obj/item/weapon/cable_coil(src)
component_parts += new /obj/item/weapon/cable_coil(src, 1)
component_parts += new /obj/item/weapon/cable_coil(src, 1)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new board_path(src)
var/obj/sheet = new sheet_path(null)
@@ -231,21 +230,14 @@ display round(lastgen) and plasmatank amount
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
else if(istype(O, /obj/item/weapon/screwdriver))
open = !open
panel_open = !panel_open
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(open)
if(panel_open)
user << "\blue You open the access panel."
else
user << "\blue You close the access panel."
else if(istype(O, /obj/item/weapon/crowbar) && !open)
var/obj/machinery/constructable_frame/machine_frame/new_frame = new /obj/machinery/constructable_frame/machine_frame(src.loc)
for(var/obj/item/I in component_parts)
if(I.reliability < 100)
I.crit_fail = 1
I.loc = src.loc
new_frame.state = 2
new_frame.icon_state = "box_1"
del(src)
else if(istype(O, /obj/item/weapon/crowbar) && panel_open)
default_deconstruction_crowbar()
/obj/machinery/power/port_gen/pacman/attack_hand(mob/user as mob)
..()
+69 -118
View File
@@ -6,8 +6,8 @@
// Not everything is included yet so the turbine can run out of fuel quiet quickly. The best thing about the turbine is that even
// though something is on fire that passes through it, it won't be on fire as it passes out of it. So the exhaust fumes can still
// containt unreacted fuel - plasma and oxygen that needs to be filtered out and re-routed back. This of course requires smart piping
// For a computer to work with the turbine the compressor requires a comp_id matching with the turbine computer's id. This will be
// subjected to a change in the near future mind you. Right now this method of generating power is a good backup but don't expect it
// For a computer to work with the turbine the compressor requires a comp_id matching with the turbine computer's id. This will be
// subjected to a change in the near future mind you. Right now this method of generating power is a good backup but don't expect it
// become a main power source unless some work is done. Have fun. At 50k RPM it generates 60k power. So more than one turbine is needed!
//
// - Numbers
@@ -38,6 +38,7 @@
var/capacity = 1e6
var/comp_id = 0
/obj/machinery/power/turbine
name = "gas turbine generator"
desc = "A gas turbine used for backup power generation."
@@ -45,7 +46,7 @@
icon_state = "turbine"
anchored = 1
density = 1
var/opened = 0
var/opened = 0
var/obj/machinery/compressor/compressor
directwired = 1
var/turf/simulated/outturf
@@ -85,8 +86,8 @@
// OLD FIX - explanation given down below.
// /obj/machinery/power/compressor/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
// return !density
/obj/machinery/power/compressor/CanAtmosPass(var/turf/T)
return !density
@@ -101,9 +102,9 @@
return
rpm = 0.9* rpm + 0.1 * rpmtarget
var/datum/gas_mixture/environment = inturf.return_air()
// It's a simplified version taking only 1/10 of the moles from the turf nearby. It should be later changed into a better version
var/transfer_moles = environment.total_moles()/10
//var/transfer_moles = rpm/10000*capacity
var/datum/gas_mixture/removed = inturf.remove_air(transfer_moles)
@@ -134,8 +135,8 @@
overlays += image('icons/obj/pipes.dmi', "comp-o1", FLY_LAYER)
//TODO: DEFERRED
// These are crucial to working of a turbine - the stats modify the power output. TurbGenQ modifies how much raw energy can you get from
// rpms, TurbGenG modifies the shape of the curve - the lower the value the less straight the curve is.
// These are crucial to working of a turbine - the stats modify the power output. TurbGenQ modifies how much raw energy can you get from
// rpms, TurbGenG modifies the shape of the curve - the lower the value the less straight the curve is.
#define TURBPRES 9000000
#define TURBGENQ 100000
@@ -144,7 +145,7 @@
/obj/machinery/power/turbine/New()
..()
// The outlet is pointed at the direction of the turbine component
// The outlet is pointed at the direction of the turbine component
outturf = get_step(src, dir)
@@ -171,26 +172,27 @@
/obj/machinery/power/turbine/process()
if(!compressor.starter)
return
overlays.Cut()
if(stat & BROKEN)
return
if(!compressor)
stat |= BROKEN
return
// This is the power generation function. If anything is needed it's good to plot it in EXCEL before modifying
// the TURBGENQ and TURBGENG values
if(!compressor.starter)
return
overlays.Cut()
// This is the power generation function. If anything is needed it's good to plot it in EXCEL before modifying
// the TURBGENQ and TURBGENG values
lastgen = ((compressor.rpm / TURBGENQ)**TURBGENG) *TURBGENQ
add_avail(lastgen)
// Weird function but it works. Should be something else...
var/newrpm = ((compressor.gas_contained.temperature) * compressor.gas_contained.total_moles())/4
newrpm = max(0, newrpm)
if(!compressor.starter || newrpm > 1000)
@@ -206,72 +208,55 @@
if(lastgen > 100)
overlays += image('icons/obj/pipes.dmi', "turb-o", FLY_LAYER)
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.interact(M)
AutoUpdateAI(src)
// AI can't use it!
/obj/machinery/power/turbine/attack_ai(mob/user)
if(stat & (BROKEN|NOPOWER))
return
interact(user)
updateDialog()
/obj/machinery/power/turbine/attack_hand(mob/user)
add_fingerprint(user)
if(..())
return
if(stat & (BROKEN|NOPOWER))
return
interact(user)
interact(user)
/obj/machinery/power/turbine/proc/interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (NOPOWER|BROKEN)) && (!istype(user, /mob/living/silicon/ai)) )
user.machine = null
user << browse(null, "window=turbine")
return
/obj/machinery/power/turbine/interact(mob/user)
user.machine = src
if ( (get_dist(src, user) > 1 ) || (stat & (NOPOWER|BROKEN)) && (!istype(user, /mob/living/silicon/ai)) )
user.unset_machine(src)
user << browse(null, "window=turbine")
return
var/t = "<TT><B>Gas Turbine Generator</B><HR><PRE>"
var/t = "<TT><B>Gas Turbine Generator</B><HR><PRE>"
t += "Generated power : [round(lastgen)] W<BR><BR>"
t += "Generated power : [round(lastgen)] W<BR><BR>"
t += "Turbine: [round(compressor.rpm)] RPM<BR>"
t += "Turbine: [round(compressor.rpm)] RPM<BR>"
t += "Starter: [ compressor.starter ? "<A href='?src=\ref[src];str=1'>Off</A> <B>On</B>" : "<B>Off</B> <A href='?src=\ref[src];str=1'>On</A>"]"
t += "Starter: [ compressor.starter ? "<A href='?src=\ref[src];str=1'>Off</A> <B>On</B>" : "<B>Off</B> <A href='?src=\ref[src];str=1'>On</A>"]"
t += "</PRE><HR><A href='?src=\ref[src];close=1'>Close</A>"
t += "</PRE><HR><A href='?src=\ref[src];close=1'>Close</A>"
t += "</TT>"
user << browse(t, "window=turbine")
onclose(user, "turbine")
t += "</TT>"
var/datum/browser/popup = new(user, "turbine", name)
popup.set_content(t)
popup.open()
return
return
/obj/machinery/power/turbine/Topic(href, href_list)
if(..())
return
if(..())
return
if( href_list["close"] )
usr << browse(null, "window=turbine")
usr.machine = null
return
if( href_list["close"] )
usr << browse(null, "window=turbine")
usr.unset_machine(src)
return
else if( href_list["str"] )
compressor.starter = !compressor.starter
else if( href_list["str"] )
if(compressor)
compressor.starter = !compressor.starter
spawn(0)
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.interact(M)
updateDialog()
@@ -290,80 +275,46 @@
for(var/obj/machinery/compressor/C in world)
if(id == C.comp_id)
compressor = C
/obj/machinery/computer/turbine_computer/attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
var/obj/item/weapon/circuitboard/turbine_control/M = new /obj/item/weapon/circuitboard/turbine_control( A )
for (var/obj/C in src)
C.loc = src.loc
M.id = src.id
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/turbine_control/M = new /obj/item/weapon/circuitboard/turbine_control( A )
for (var/obj/C in src)
C.loc = src.loc
M.id = src.id
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)
else
src.attack_hand(user)
return
/obj/machinery/computer/turbine_computer/attack_hand(var/mob/user as mob)
user.machine = src
if(..())
return
interact(user)
/obj/machinery/computer/turbine_computer/interact(mob/user)
var/dat
if(src.compressor)
if(compressor)
dat += {"<BR><B>Gas turbine remote control system</B><HR>
\nTurbine status: [ src.compressor.starter ? "<A href='?src=\ref[src];str=1'>Off</A> <B>On</B>" : "<B>Off</B> <A href='?src=\ref[src];str=1'>On</A>"]
\n<BR>
\nTurbine speed: [src.compressor.rpm]rpm<BR>
\nPower currently being generated: [src.compressor.turbine.lastgen]W<BR>
\nInternal gas temperature: [src.compressor.gas_contained.temperature]K<BR>
\n</PRE><HR><A href='?src=\ref[src];view=1'>View</A>
\n</PRE><HR><A href='?src=\ref[src];close=1'>Close</A>
\n<BR>
\n"}
else
dat += "\red<B>No compatible attached compressor found."
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
var/datum/browser/popup = new(user, "turbinecomputer", name)
popup.set_content(dat)
popup.open()
return
/obj/machinery/computer/turbine_computer/Topic(href, href_list)
if(..())
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
if( href_list["view"] )
usr.client.eye = src.compressor
else if( href_list["str"] )
src.compressor.starter = !src.compressor.starter
else if( href_list["close"] )
usr << browse(null, "window=computer")
usr.machine = null
return
else if( href_list["str"] )
if(compressor)
compressor.starter = !compressor.starter
else if( href_list["close"] )
usr << browse(null, "window=turbinecomputer")
usr.unset_machine(src)
return
src.add_fingerprint(usr)
src.updateUsrDialog()
return
@@ -99,6 +99,7 @@
/obj/item/ammo_casing/shotgun/dart/New()
..()
flags |= NOREACT
flags |= OPENCONTAINER
create_reagents(30)
/obj/item/ammo_casing/shotgun/dart/attackby()
+9 -5
View File
@@ -11,7 +11,6 @@
var/obj/item/ammo_box/magazine/magazine
var/obj/item/ammo_casing/chambered = null // The round (not bullet) that is in the chamber.
/obj/item/weapon/gun/projectile/New()
..()
magazine = new mag_type(src)
@@ -19,17 +18,22 @@
update_icon()
return
/obj/item/weapon/gun/projectile/process_chambered()
/obj/item/weapon/gun/projectile/process_chambered(var/eject_casing = 1, var/empty_chamber = 1)
// if(in_chamber)
// return 1
var/obj/item/ammo_casing/AC = chambered //Find chambered round
if(isnull(AC) || !istype(AC))
return 0
AC.loc = get_turf(src) //Eject casing onto ground.
chambered = null
if(eject_casing)
AC.loc = get_turf(src) //Eject casing onto ground.
if(empty_chamber)
chambered = null
chamber_round()
if(AC.BB)
if(AC.reagents && AC.BB.reagents)
var/datum/reagents/casting_reagents = AC.reagents
casting_reagents.trans_to(AC.BB, casting_reagents.total_volume) //For chemical darts/bullets
casting_reagents.delete()
in_chamber = AC.BB //Load projectile into chamber.
AC.BB.loc = src //Set projectile loc to gun.
AC.BB = null
@@ -13,18 +13,7 @@
return
/obj/item/weapon/gun/projectile/revolver/process_chambered()
var/obj/item/ammo_casing/AC = chambered //Find chambered round
if(isnull(AC) || !istype(AC))
return 0
chambered = null
chamber_round()
if(AC.BB)
in_chamber = AC.BB //Load projectile into chamber.
AC.BB.loc = src //Set projectile loc to gun.
AC.BB = null
AC.update_icon()
return 1
return 0
return ..(0, 1)
/obj/item/weapon/gun/projectile/revolver/attackby(var/obj/item/A as obj, mob/user as mob)
var/num_loaded = 0
@@ -35,21 +35,10 @@
update_icon()
/obj/item/weapon/gun/projectile/shotgun/process_chambered()
var/obj/item/ammo_casing/AC = chambered //Find chambered round
if(isnull(AC) || !istype(AC))
return 0
if(AC.BB)
if(AC.reagents && AC.BB.reagents)
var/datum/reagents/casting_reagents = AC.reagents
casting_reagents.trans_to(AC.BB, casting_reagents.total_volume) //For chemical darts
casting_reagents.delete()
in_chamber = AC.BB //Load projectile into chamber.
AC.BB.loc = src //Set projectile loc to gun.
AC.BB = null
AC.update_icon()
return 1
return 0
return ..(0, 0)
/obj/item/weapon/gun/projectile/shotgun/chamber_round()
return
/obj/item/weapon/gun/projectile/shotgun/attack_self(mob/living/user)
if(recentpump) return
+8 -8
View File
@@ -55,7 +55,7 @@
// Garbage collect the projectiles
loc = null
proc/on_hit(var/atom/target, var/blocked = 0)
proc/on_hit(var/atom/target, var/blocked = 0, var/hit_zone)
if(blocked >= 2) return 0//Full block
if(!isliving(target)) return 0
if(isanimal(target)) return 0
@@ -78,6 +78,12 @@
loc = A.loc
return 0// nope.avi
var/reagent_note
if(reagents && reagents.reagent_list)
reagent_note = " REAGENTS:"
for(var/datum/reagent/R in reagents.reagent_list)
reagent_note += R.id + " ("
reagent_note += num2text(R.volume) + ") "
var/distance = get_dist(get_turf(A), starting) // Get the distance between the turf shot from and the mob we hit and use that for the calculations.
def_zone = ran_zone(def_zone, max(100-(7*distance), 5)) //Lower accurancy/longer range tradeoff. 7 is a balanced number to use.
if(silenced)
@@ -85,14 +91,8 @@
else
M.visible_message("<span class='danger'>[M] is hit by [src] in the [parse_zone(def_zone)]!", \
"<span class='userdanger'>[M] is hit by [src] in the [parse_zone(def_zone)]!") //X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
add_logs(firer, M, "shot", object="[src]", addition=reagent_note)
if(istype(firer, /mob))
M.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
log_attack("<font color='red'>[firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src]</font>")
else
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
log_attack("<font color='red'>UNKNOWN shot [M] ([M.ckey]) with a [src]</font>")
spawn(0)
if(A)
@@ -65,13 +65,14 @@
flags |= NOREACT
create_reagents(50)
on_hit(var/atom/target, var/blocked = 0)
on_hit(var/atom/target, var/blocked = 0, var/hit_zone)
if(istype(target, /mob/living/carbon))
var/mob/living/carbon/M = target
reagents.trans_to(M, reagents.total_volume)
else
flags &= ~NOREACT
reagents.handle_reactions()
if(M.can_inject(target_zone = hit_zone)) // Pass the hit zone to see if it can inject by whether it hit the head or the body.
reagents.trans_to(M, reagents.total_volume)
return 1
flags &= ~NOREACT
reagents.handle_reactions()
return 1
/obj/item/projectile/bullet/dart/metalfoam
@@ -83,17 +83,16 @@ Borg Hypospray
R.cell.use(charge_cost) //Take power from borg...
RG.add_reagent(reagent_ids[mode], 5) //And fill hypo with reagent.
/obj/item/weapon/reagent_containers/borghypo/attack(mob/M as mob, mob/user as mob)
/obj/item/weapon/reagent_containers/borghypo/attack(mob/living/M as mob, mob/user as mob)
var/datum/reagents/R = reagent_list[mode]
if(!R.total_volume)
user << "<span class='notice'>The injector is empty.</span>"
return
if (!( istype(M, /mob) ))
if (!( istype(M) ))
return
if (R.total_volume)
user << "<span class='notice'>You inject [M] with the injector.</span>"
if (R.total_volume && M.can_inject(user, 1))
M << "<span class='warning'>You feel a tiny prick!</span>"
user << "<span class='notice'>You inject [M] with the injector.</span>"
R.reaction(M, INGEST)
if(M.reagents)
var/trans = R.trans_to(M, amount_per_transfer_from_this)
@@ -63,9 +63,7 @@
for(var/datum/reagent/A in src.reagents.reagent_list)
R += A.id + " ("
R += num2text(A.volume) + "),"
user.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> squirted <b>[M]/[M.ckey]</b> with ([R])"
M.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> squirted <b>[M]/[M.ckey]</b> with ([R])"
log_attack("\[[time_stamp()]\] <b>[user]/[user.ckey]</b> squirted <b>[M]/[M.ckey]</b> with ([R])")
add_logs(user, M, "squirted", object="[R]")
trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
user << "<span class='notice'>You transfer [trans] unit\s of the solution.</span>"
@@ -42,12 +42,7 @@
if(!do_mob(user, M)) return
for(var/mob/O in viewers(world.view, user))
O.show_message("\red [user] feeds [M] [src].", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [src.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
add_logs(user, M, "fed", object="[reagentlist(src)]")
if(reagents.total_volume)
reagents.reaction(M, INGEST)
@@ -42,13 +42,7 @@
if(!do_mob(user, M)) return
for(var/mob/O in viewers(world.view, user))
O.show_message("\red [user] feeds [M] [src].", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
add_logs(user, M, "fed", object="[reagentlist(src)]")
if(reagents.total_volume)
reagents.reaction(M, INGEST)
spawn(5)
@@ -327,7 +321,7 @@
icon_state = "lemon-lime"
New()
..()
name = "Lemon-Lime"
name = "Lemon-Lime"
reagents.add_reagent("lemon_lime", 30)
src.pixel_x = rand(-10.0, 10)
src.pixel_y = rand(-10.0, 10)
@@ -381,4 +375,4 @@
..()
reagents.add_reagent("dr_gibb", 30)
src.pixel_x = rand(-10.0, 10)
src.pixel_y = rand(-10.0, 10)
src.pixel_y = rand(-10.0, 10)
@@ -97,9 +97,7 @@
else O.show_message(text("\red <B>[target] has attacked himself with a bottle of [src.name]!</B>"), 1)
//Attack logs
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has attacked [target.name] ([target.ckey]) with a bottle!</font>")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been smashed with a bottle by [user.name] ([user.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [target.name] with a bottle. ([target.ckey])</font>")
add_logs(user, target, "attacked", object="bottle")
//The reagents in the bottle splash all over the target, thanks for the idea Nodrak
if(src.reagents)
@@ -71,12 +71,7 @@
return 0
if(!do_mob(user, M)) return
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [src.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
add_logs(user, M, "fed", object="[reagentlist(src)]")
M.visible_message("<span class='danger'>[user] forces [M] to eat [src].</span>", \
"<span class='userdanger'>[user] feeds [M] to eat [src].</span>")
@@ -2427,4 +2422,4 @@
..()
reagents.add_reagent("nutriment", 2)
reagents.add_reagent("sugar", 5)
bitesize = 2
bitesize = 2
@@ -55,9 +55,7 @@
for(var/datum/reagent/A in reagents.reagent_list)
R += A.id + " ("
R += num2text(A.volume) + "),"
user.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> splashed <b>[M]/[M.ckey]</b> with ([R])"
M.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> splashed <b>[M]/[M.ckey]</b> with ([R])"
log_attack("\[[time_stamp()]\] <b>[user]/[user.ckey]</b> splashed <b>[M]/[M.ckey]</b> with ([R])")
add_logs(user, M, "splashed", object="[R]")
reagents.reaction(target, TOUCH)
spawn(5) reagents.clear_reagents()
return
@@ -9,6 +9,7 @@
possible_transfer_amounts = null
flags = FPRINT | TABLEPASS | OPENCONTAINER
slot_flags = SLOT_BELT
var/ignore_flags = 0
/obj/item/weapon/reagent_containers/hypospray/attack_paw(mob/user)
return attack_hand(user)
@@ -19,15 +20,16 @@
reagents.add_reagent("doctorsdelight", 30)
/obj/item/weapon/reagent_containers/hypospray/attack(mob/M, mob/user)
/obj/item/weapon/reagent_containers/hypospray/attack(mob/living/M, mob/user)
if(!reagents.total_volume)
user << "<span class='notice'>[src] is empty.</span>"
return
if(!ismob(M))
if(!istype(M))
return
if(reagents.total_volume)
user << "<span class='notice'>You inject [M] with [src].</span>"
if(reagents.total_volume && (ignore_flags || M.can_inject(user, 1))) // Ignore flag should be checked first or there will be an error message.
M << "<span class='warning'>You feel a tiny prick!</span>"
user << "<span class='notice'>You inject [M] with [src].</span>"
reagents.reaction(M, INGEST)
if(M.reagents)
@@ -40,10 +42,7 @@
var/contained = english_list(injected)
log_attack("<font color='red'>[user.name] ([user.ckey]) injected [M.name] ([M.ckey]) with [src.name], which had [contained] (INTENT: [uppertext(user.a_intent)])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected ([contained]) with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to inject [M.name] ([M.ckey]) with [contained]</font>")
add_logs(user, M, "injected", object="[src.name]", addition="([contained])")
/obj/item/weapon/reagent_containers/hypospray/combat
name = "combat stimulant injector"
@@ -51,6 +50,7 @@
amount_per_transfer_from_this = 10
icon_state = "combat_hypo"
volume = 60
ignore_flags = 1 // So they can heal their comrades.
/obj/item/weapon/reagent_containers/hypospray/combat/New()
..()
@@ -41,12 +41,7 @@
M.visible_message("<span class='danger'>[user] forces [M] to swallow [src].</span>", \
"<span class='userdanger'>[user] forces [M] to swallow [src].</span>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [src.name] to [M.name] ([M.ckey]) Reagents: [reagentlist(src)]</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
add_logs(user, M, "fed", object="[reagentlist(src)]")
if(reagents.total_volume)
reagents.reaction(M, INGEST)
@@ -44,6 +44,11 @@
if(!proximity) return
if(!target.reagents) return
if(isliving(target))
var/mob/living/M = target
if(!M.can_inject(user, 1))
return
switch(mode)
if(SYRINGE_DRAW)
@@ -122,7 +127,7 @@
if(istype(target, /obj/item/weapon/implantcase/chem))
return
if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/ammo_casing/shotgun/dart) && !istype(target, /obj/item/slime_extract) && !istype(target, /obj/item/clothing/mask/cigarette) && !istype(target, /obj/item/weapon/storage/fancy/cigarettes))
if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/slime_extract) && !istype(target, /obj/item/clothing/mask/cigarette) && !istype(target, /obj/item/weapon/storage/fancy/cigarettes))
user << "<span class='notice'>You cannot directly fill [target].</span>"
return
if(target.reagents.total_volume >= target.reagents.maximum_volume)
@@ -141,10 +146,7 @@
rinject += R.name
var/contained = english_list(rinject)
var/mob/M = target
log_attack("<font color='red'>[user.name] ([user.ckey]) injected [M.name] ([M.ckey]) with [src.name], which had [contained] (INTENT: [uppertext(user.a_intent)])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected ([contained]) with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to inject [M.name] ([M.ckey]) with [contained]</font>")
add_logs(user, M, "injected", object="[src.name]", addition="which had [contained]")
reagents.reaction(target, INGEST)
if(ismob(target) && target == user)
//Attack log entries are produced here due to failure to produce elsewhere. Remove them here if you have doubles from normal syringes.
@@ -117,7 +117,6 @@
user.attack_log += text("\[[time_stamp()]\] <font color='blue'>Has used [name] on \ref[target]</font>")
if(istype(target, /obj/item) && !(istype(target, /obj/item/weapon/storage) && !istype(target,/obj/item/weapon/storage/box)))
var/obj/item/O = target
if(amount > 1)
+5 -12
View File
@@ -52,19 +52,12 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
if (shocked)
shock(user,50)
if (istype(O, /obj/item/weapon/screwdriver))
if (!opened)
opened = 1
if(linked_console)
linked_console.linked_imprinter = null
linked_console = null
icon_state = "circuit_imprinter_t"
user << "You open the maintenance hatch of [src]."
else
opened = 0
icon_state = "circuit_imprinter"
user << "You close the maintenance hatch of [src]."
if(linked_console)
linked_console.linked_imprinter = null
linked_console = null
default_deconstruction_screwdriver(user, "circuit_imprinter_t", "circuit_imprinter")
return
if (opened)
if (panel_open)
if(istype(O, /obj/item/weapon/crowbar))
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)

Some files were not shown because too many files have changed in this diff Show More