Merge branch 'master' of https://github.com/tgstation/-tg-station into goonchem_shoehorn_backup

This commit is contained in:
Iamgoofball
2015-01-16 17:25:50 -08:00
130 changed files with 2634 additions and 983 deletions
+5 -1
View File
@@ -66,7 +66,11 @@
log_admin("[key_name(usr)] started a gang war.")
if(!src.makeGangsters())
usr << "<span class='danger'>Unfortunatly there were not enough candidates available.</span>"
if("13")
message_admins("[key_name(usr)] created a emergency response team.")
log_admin("[key_name(usr)] created a emergency response team.")
if(!src.makeEmergencyresponseteam())
usr << "<span class='danger'>Unfortunatly there were not enough candidates available.</span>"
else if(href_list["forceevent"])
var/datum/round_event_control/E = locate(href_list["forceevent"]) in SSevent.control
+27 -1
View File
@@ -796,7 +796,7 @@ var/global/list/g_fancy_list_of_types = null
qdel(briefcase_item)
for(var/i=3, i>0, i--)
sec_briefcase.contents += new /obj/item/weapon/spacecash/c1000
sec_briefcase.contents += new /obj/item/weapon/gun/projectile/automatic/crossbow
sec_briefcase.contents += new /obj/item/weapon/gun/energy/kinetic_accelerator/crossbow
sec_briefcase.contents += new /obj/item/weapon/gun/projectile/revolver/mateba
sec_briefcase.contents += new /obj/item/ammo_box/a357
sec_briefcase.contents += new /obj/item/weapon/c4
@@ -819,6 +819,9 @@ var/global/list/g_fancy_list_of_types = null
if("death commando")
equip_deathsquad(M)
if("emergency response officer")
equip_emergencyresponsesquad(M)
if("centcom official")
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(M), slot_shoes)
@@ -1054,6 +1057,7 @@ var/global/list/g_fancy_list_of_types = null
usr << browse(dat, "window=dellog")
//Deathsquad
/proc/equip_deathsquad(var/mob/living/carbon/human/M, var/officer)
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(M)
R.set_frequency(1441)
@@ -1101,3 +1105,25 @@ var/global/list/g_fancy_list_of_types = null
W.registered_name = M.real_name
W.update_label(M.real_name)
M.equip_to_slot_or_del(W, slot_wear_id)
//Emergency Response Team
/proc/equip_emergencyresponsesquad(var/mob/living/carbon/human/M, var/officer)
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(M)
R.set_frequency(1441)
M.equip_to_slot_or_del(R, slot_ears)
if(officer)
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat/swat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/card/id/ertsCommand(M), slot_wear_id)
else
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat/swat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(M)
L.imp_in = M
L.implanted = 1
M.sec_hud_set_implants()
@@ -21,6 +21,7 @@ client/proc/one_click_antag()
<a href='?src=\ref[src];makeAntag=6'>Make Wizard (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=7'>Make Nuke Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=10'>Make Deathsquad (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=13'>Make Emergency Response Team (Requires Ghosts)</a><br>
"}
/* These dont work just yet
Ninja, aliens and deathsquad I have not looked into yet
@@ -427,6 +428,83 @@ client/proc/one_click_antag()
return 0
// EMERGENCY RESPONSE TEAM
/datum/admins/proc/makeEmergencyresponseteam()
var/list/mob/dead/observer/candidates = list()
var/time_passed = world.time
var/mission = input("Assign a mission to the Emergency Response Team", "Assign Mission", "Assist the station.")
//Generates a list of officers from active ghosts. Then the user picks which characters to respawn as the officers.
for(var/mob/dead/observer/G in player_list)
spawn(0)
switch(alert(G,"Do you wish to be considered for an elite Nanotrasen Emergency Response Team being sent in?","Please answer in 30 seconds!","Yes","No"))
if("Yes")
if((world.time-time_passed)>300)//If more than 30 game seconds passed.
return
candidates += G
if("No")
return
else
return
sleep(300)
for(var/mob/dead/observer/G in candidates)
if(!G.key)
candidates.Remove(G)
if(candidates.len >= 4) //Minimum 4 to be considered a squad
//Pick the (un)lucky players
var/numagents = min(7,candidates.len) //How many officers to spawn
var/list/spawnpoints = emergencyresponseteamspawn
while(numagents && spawnpoints.len && candidates.len)
var/spawnloc = spawnpoints[1]
var/mob/dead/observer/chosen_candidate = pick(candidates)
candidates -= chosen_candidate
if(!chosen_candidate.key)
continue
//Spawn and equip the officer
var/mob/living/carbon/human/ERTOperative = new(spawnloc)
chosen_candidate.client.prefs.copy_to(ERTOperative)
ready_dna(ERTOperative)
if(numagents == 1) //If Squad Leader
ERTOperative.real_name = "Commander [pick(ERTOperative.real_name)]"
equip_emergencyresponsesquad(ERTOperative, 1)
else
ERTOperative.real_name = "Officer [pick(ERTOperative.real_name)]"
equip_emergencyresponsesquad(ERTOperative)
ERTOperative.key = chosen_candidate.key
ERTOperative.mind.assigned_role = "ERT"
//Assign antag status and the mission
ticker.mode.traitors += ERTOperative.mind
ERTOperative.mind.special_role = "ert"
var/datum/objective/missionobj = new
missionobj.owner = ERTOperative.mind
missionobj.explanation_text = mission
missionobj.completed = 1
ERTOperative.mind.objectives += missionobj
//Greet the commando
ERTOperative << "<B><font size=3 color=red>You are the [numagents==1?"Emergency Response Team Commander":"Emergency Response Officer"].</font></B>"
var/missiondesc = "Your squad is being sent on a mission to [station_name()] by Nanotrasen's Security Division."
if(numagents == 1) //If Squad Leader
missiondesc += " Lead your squad to ensure the completion of the mission. Avoid civilian casualites when possible. Board the shuttle when your team is ready."
else
missiondesc += " Follow orders given to you by your commander. Avoid civilian casualites when possible."
missiondesc += "<BR><B>Your Mission</B>: [mission]"
ERTOperative << missiondesc
//Logging and cleanup
if(numagents == 1)
message_admins("The emergency response team has spawned with the mission: [mission].")
log_game("[key_name(ERTOperative)] has been selected as a Emergency Response Officer")
spawnpoints -= spawnloc
numagents--
return 1
return
/datum/admins/proc/makeBody(var/mob/dead/observer/G_found) // Uses stripped down and bastardized code from respawn character
if(!G_found || !G_found.key) return
+1 -2
View File
@@ -88,8 +88,7 @@
if((!secured)||(!on)||(cooldown > 0))
return 0
pulse(0)
if(src.loc)
src.loc.audible_message("\icon[src] *beep* *beep*", null, 3)
audible_message("\icon[src] *beep* *beep*", null, 3)
cooldown = 2
spawn(10)
process_cooldown()
+1 -2
View File
@@ -48,8 +48,7 @@
/obj/item/device/assembly/prox_sensor/sense()
if((!secured)||(!scanning)||(cooldown > 0)) return 0
pulse(0)
if(src.loc)
src.loc.audible_message("\icon[src] *beep* *beep*", null, 3)
audible_message("\icon[src] *beep* *beep*", null, 3)
cooldown = 2
spawn(10)
process_cooldown()
+1 -2
View File
@@ -139,8 +139,7 @@ Code:
if(signal.encryption != code) return 0
if(!(src.wires & WIRE_RADIO_RECEIVE)) return 0
pulse(1)
if(src.loc)
src.loc.audible_message("\icon[src] *beep* *beep*", null, 1)
audible_message("\icon[src] *beep* *beep*", null, 1)
return
+1 -2
View File
@@ -38,8 +38,7 @@
if((!secured)||(cooldown > 0))
return 0
pulse(0)
if(src.loc)
src.loc.audible_message("\icon[src] *beep* *beep*", null, 3)
audible_message("\icon[src] *beep* *beep*", null, 3)
cooldown = 2
spawn(10)
process_cooldown()
@@ -0,0 +1,213 @@
/obj/item/clothing/head/helmet/space/chronos
name = "Chronosuit Helmet"
desc = "A white helmet with an opaque blue visor."
icon_state = "chronohelmet"
item_state = "chronohelmet"
slowdown = 1
armor = list(melee = 60, bullet = 30/*bullet through the visor*/, laser = 60, energy = 60, bomb = 30, bio = 90, rad = 90)
var/obj/item/clothing/suit/space/chronos/suit = null
/obj/item/clothing/head/helmet/space/chronos/dropped()
if(suit)
suit.deactivate()
..()
/obj/item/clothing/head/helmet/space/chronos/Destroy()
dropped()
..()
/obj/item/clothing/suit/space/chronos
name = "Chronosuit"
desc = "An advanced spacesuit equipped with teleportation and anti-compression technology"
icon_state = "chronosuit"
item_state = "chronosuit"
action_button_name = "Toggle Chronosuit"
slowdown = 2
armor = list(melee = 60, bullet = 60, laser = 60, energy = 60, bomb = 30, bio = 90, rad = 90)
var/obj/item/clothing/head/helmet/space/chronos/helmet = null
var/obj/effect/chronos_cam/camera = null
var/activating = 0
var/activated = 0
var/cooldowntime = 50 //deciseconds
var/cooldown = 0
var/teleporting = 0
/obj/item/clothing/suit/space/chronos/proc/new_camera(var/mob/user)
if(camera)
qdel(camera)
camera = new /obj/effect/chronos_cam(get_turf(user))
camera.holder = user
user.remote_control = camera
/obj/item/clothing/suit/space/chronos/ui_action_click()
if((cooldown <= world.time) && !teleporting && !activating)
if(!activated)
activate()
else
deactivate()
/obj/item/clothing/suit/space/chronos/dropped()
if(activated)
deactivate()
..()
/obj/item/clothing/suit/space/chronos/Destroy()
dropped()
..()
/obj/item/clothing/suit/space/chronos/emp_act(severity)
var/mob/living/carbon/human/user = src.loc
switch(severity)
if(1)
if(user && ishuman(user) && (user.wear_suit == src))
user << "<span class='userdanger'>Elecrtromagnetic pulse detected, shutting down systems to preserve integrity...</span>"
deactivate()
/obj/item/clothing/suit/space/chronos/proc/chronowalk(var/mob/living/carbon/human/user)
if(!teleporting && user && (user.stat == CONSCIOUS))
teleporting = 1
var/turf/from_turf = get_turf(user)
if(!from_turf) //sanity, things happen
teleporting = 0
return
var/turf/to_turf = from_turf
var/atom/movable/overlay/phaseanim = new(from_turf)
var/obj/holder = new(camera)
phaseanim.name = "phasing [user.name]"
phaseanim.icon = 'icons/mob/mob.dmi'
phaseanim.icon_state = "chronostuck"
phaseanim.density = 1
phaseanim.layer = FLY_LAYER
phaseanim.master = user
user.ExtinguishMob()
if(user.buckled)
user.buckled.unbuckle()
user.loc = holder
flick("chronophase", phaseanim)
spawn(7)
if(user)
if(phaseanim)
if(camera && camera.loc)
to_turf = camera.loc
flick("chronounphase", phaseanim)
else
flick("chronostuck", phaseanim)
phaseanim.loc = to_turf
sleep(7)
if(holder)
if(user && user in holder.contents)
user.loc = to_turf
if(user.client)
if(camera)
user.client.eye = camera
else
user.client.eye = user
qdel(holder)
else if(user)
user.loc = from_turf
if(phaseanim)
qdel(phaseanim)
teleporting = 0
if(user && !user.loc) //ubersanity
user.loc = locate(0,0,1)
user.gib()
/obj/item/clothing/suit/space/chronos/process()
if(activated)
var/mob/living/carbon/human/user = src.loc
if(user && ishuman(user) && (user.wear_suit == src))
if(camera && (user.remote_control == camera))
if(!teleporting && !((camera.x == user.x) && (camera.y == user.y) && (camera.z == user.z))) //cheaper than a couple get_turf calls???
chronowalk(user)
else
new_camera(user)
else
SSobj.processing.Remove(src)
/obj/item/clothing/suit/space/chronos/proc/activate()
if(!activating && !activated && !teleporting)
activating = 1
var/mob/living/carbon/human/user = src.loc
if(user && ishuman(user))
if(user.wear_suit == src)
user << "\nChronosuitMK4 login: root"
user << "Password:\n"
user << "root@ChronosuitMK4# chronowalk4 --start\n"
if(user.head && istype(user.head, /obj/item/clothing/head/helmet/space/chronos))
user << "\[ <span style='color: #00ff00;'>ok</span> \] Mounting /dev/helmet"
helmet = user.head
helmet.flags |= NODROP
helmet.suit = src
src.flags |= NODROP
user << "\[ <span style='color: #00ff00;'>ok</span> \] Starting brainwave scanner"
user << "\[ <span style='color: #00ff00;'>ok</span> \] Starting ui display driver"
user << "\[ <span style='color: #00ff00;'>ok</span> \] Initializing chronowalk4-view"
new_camera(user)
SSobj.processing.Add(src)
activated = 1
else
user << "\[ <span style='color: #ff0000;'>fail</span> \] Mounting /dev/helmet"
user << "<span style='color: #ff0000;'><b>FATAL: </b>Unable to locate /dev/helmet. <b>Aborting...</b>"
cooldown = world.time + cooldowntime
activating = 0
return 0
/obj/item/clothing/suit/space/chronos/proc/deactivate()
if(activated)
activating = 1
var/mob/living/carbon/human/user = src.loc
if(user && ishuman(user))
if(user.wear_suit == src)
user << "\nroot@ChronosuitMK4# chronowalk4 --stop\n"
if(camera)
user << "\[ <span style='color: #ff5500;'>ok</span> \] Sending TERM signal to chronowalk4-view" //yes I know they aren't a different color when shutting down, but they were too similar at a glance
qdel(camera)
if(helmet)
user << "\[ <span style='color: #ff5500;'>ok</span> \] Stopping ui display driver"
user << "\[ <span style='color: #ff5500;'>ok</span> \] Stopping brainwave scanner"
user << "\[ <span style='color: #ff5500;'>ok</span> \] Unmounting /dev/helmet"
helmet.flags &= ~NODROP
helmet.suit = null
helmet = null
user << "logout"
src.flags &= ~NODROP
cooldown = world.time + cooldowntime * 1.5
activated = 0
activating = 0
/obj/effect/chronos_cam
name = "Chronosuit View"
density = 0
anchored = 1
invisibility = 101
opacity = 0
mouse_opacity = 0
var/mob/holder = null
/obj/effect/chronos_cam/relaymove(var/mob/user, direction)
if(holder)
if(user == holder)
if(user.client && user.client.eye != src)
src.loc = get_turf(user)
user.client.eye = src
var/step = get_step(src, direction)
if(step)
if(istype(step, /turf/space))
if(!src.Move(step))
src.loc = step
else
src.loc = step
else
qdel(src)
/obj/effect/chronos_cam/Destroy()
if(holder)
if(holder.remote_control == src)
holder.remote_control = null
if(holder.client && (holder.client.eye == src))
holder.client.eye = holder
..()
@@ -115,3 +115,56 @@
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
strip_delay = 40
put_on_delay = 20
//Emergency Response Team suits
/obj/item/clothing/head/helmet/space/hardsuit/ert
name = "emergency response unit helmet"
desc = "Standard issue command helmet for the ERT"
icon_state = "hardsuit0-ert_commander"
item_state = "hardsuit0-ert_commander"
item_color = "ert_commander"
armor = list(melee = 65, bullet = 50, laser = 50, energy = 50, bomb = 50, bio = 100, rad = 100)
strip_delay = 130
/obj/item/clothing/head/helmet/space/hardsuit/ert/sec
desc = "Standard issue security helmet for the ERT"
icon_state = "hardsuit0-ert_security"
item_state = "hardsuit0-ert_security"
item_color = "ert_security"
/obj/item/clothing/head/helmet/space/hardsuit/ert/engi
desc = "Standard issue engineer helmet for the ERT"
icon_state = "hardsuit0-ert_engineer"
item_state = "hardsuit0-ert_engineer"
item_color = "ert_engineer"
/obj/item/clothing/head/helmet/space/hardsuit/ert/med
desc = "Standard issue medical helmet for the ERT"
icon_state = "hardsuit0-ert_medical"
item_state = "hardsuit0-ert_medical"
item_color = "ert_medical"
/obj/item/clothing/suit/space/ert
name = "emergency response team suit"
desc = "Standard issue command suit for the ERT."
icon_state = "ert_command"
item_state = "ert_command"
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
armor = list(melee = 65, bullet = 50, laser = 50, energy = 50, bomb = 50, bio = 100, rad = 100)
slowdown = 1
strip_delay = 130
/obj/item/clothing/suit/space/ert/sec
desc = "Standard issue security suit for the ERT."
icon_state = "ert_security"
item_state = "ert_security"
/obj/item/clothing/suit/space/ert/engi
desc = "Standard issue engineer suit for the ERT."
icon_state = "ert_engineer"
item_state = "ert_engineer"
/obj/item/clothing/suit/space/ert/med
desc = "Standard issue medical suit for the ERT."
icon_state = "ert_medical"
item_state = "ert_medical"
+1 -1
View File
@@ -1555,7 +1555,7 @@ ________________________________________________________________________________
P.tnote += "<i><b>&larr; From [!s_control?(A):"an unknown source"]:</b></i><br>[t]<br>"
if (!P.silent)
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
P.loc.audible_message("\icon[P] *[P.ttone]*", null, 3)
P.audible_message("\icon[P] *[P.ttone]*", null, 3)
P.overlays.Cut()
P.overlays += image('icons/obj/pda.dmi', "pda-r")
+1 -1
View File
@@ -342,7 +342,7 @@ mob/living/carbon/proc/handle_hallucinations()
return
var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/item/ammo_box/a357,\
/obj/item/weapon/gun/projectile/automatic/crossbow, /obj/item/weapon/melee/energy/sword/saber,\
/obj/item/weapon/gun/energy/kinetic_accelerator/crossbow, /obj/item/weapon/melee/energy/sword/saber,\
/obj/item/weapon/storage/box/syndicate, /obj/item/weapon/storage/box/emps,\
/obj/item/weapon/cartridge/syndicate, /obj/item/clothing/under/chameleon,\
/obj/item/clothing/shoes/syndigaloshes, /obj/item/weapon/card/id/syndicate,\
+2 -2
View File
@@ -41,10 +41,10 @@
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
return 1
M.visible_message("<span class='warning'>[user] attempts to feed [src] to [M].</span>", "<span class='notice'>You attempt to feed [src] to [M].</span>")
user.visible_message("<span class='warning'>[user] attempts to feed [src] to [M].</span>", "<span class='notice'>You attempt to feed [src] to [M].</span>")
if(!do_mob(user, M)) return
if(!reagents.total_volume) return // The drink might be empty after the delay, such as by spam-feeding
M.visible_message("<span class='warning'>[user] feeds [src] to [M].</span>", "<span class='notice'>You feed [src] to [M].</span>")
user.visible_message("<span class='warning'>[user] feeds [src] to [M].</span>", "<span class='notice'>You feed [src] to [M].</span>")
add_logs(user, M, "fed", object="[reagentlist(src)]")
if(reagents.total_volume)
reagents.reaction(M, INGEST)
+36 -4
View File
@@ -135,15 +135,19 @@
dat += "<A href='?src=\ref[src];activate=1'>Activate</A><A href='?src=\ref[src];detach=1'>Detach Container</A>"
dat += "<h3>Food:</h3>"
dat += "<div class='statusDisplay'>"
dat += "10 milk: <A href='?src=\ref[src];create=milk;amount=1'>Make</A> ([20/efficiency])<BR>"
dat += "10 cream: <A href='?src=\ref[src];create=cream;amount=1'>Make</A> ([30/efficiency])<BR>"
dat += "Monkey cube: <A href='?src=\ref[src];create=meat;amount=1'>Make</A> ([250/efficiency])"
dat += "10 milk: <A href='?src=\ref[src];create=milk;amount=1'>Make</A><A href='?src=\ref[src];create=milk;amount=5'>x5</A> ([20/efficiency])<BR>"
dat += "10 cream: <A href='?src=\ref[src];create=cream;amount=1'>Make</A><A href='?src=\ref[src];create=cream;amount=5'>x5</A> ([30/efficiency])<BR>"
dat += "Milk Carton: <A href='?src=\ref[src];create=cmilk;amount=1'>Make</A><A href='?src=\ref[src];create=cmilk;amount=5'>x5</A> ([100/efficiency])<BR>"
dat += "Cream Carton: <A href='?src=\ref[src];create=ccream;amount=1'>Make</A><A href='?src=\ref[src];create=ccream;amount=5'>x5</A> ([300/efficiency])<BR>"
dat += "Monkey cube: <A href='?src=\ref[src];create=meat;amount=1'>Make</A><A href='?src=\ref[src];create=meat;amount=5'>x5</A> ([250/efficiency])"
dat += "</div>"
dat += "<h3>Nutrients:</h3>"
dat += "<h3>Botany Chemicals:</h3>"
dat += "<div class='statusDisplay'>"
dat += "E-Z-Nutrient: <A href='?src=\ref[src];create=ez;amount=1'>Make</A><A href='?src=\ref[src];create=ez;amount=5'>x5</A> ([10/efficiency])<BR>"
dat += "Left 4 Zed: <A href='?src=\ref[src];create=l4z;amount=1'>Make</A><A href='?src=\ref[src];create=l4z;amount=5'>x5</A> ([20/efficiency])<BR>"
dat += "Robust Harvest: <A href='?src=\ref[src];create=rh;amount=1'>Make</A><A href='?src=\ref[src];create=rh;amount=5'>x5</A> ([25/efficiency])<BR>"
dat += "Weed Killer: <A href='?src=\ref[src];create=wk;amount=1'>Make</A><A href='?src=\ref[src];create=wk;amount=5'>x5</A> ([50/efficiency])<BR>"
dat += "Pest Killer: <A href='?src=\ref[src];create=pk;amount=1'>Make</A><A href='?src=\ref[src];create=pk;amount=5'>x5</A> ([50/efficiency])<BR>"
dat += "</div>"
dat += "<h3>Leather:</h3>"
dat += "<div class='statusDisplay'>"
@@ -153,6 +157,10 @@
dat += "Mining satchel: <A href='?src=\ref[src];create=mnbag;amount=1'>Make</A> ([200/efficiency])<BR>"
dat += "Botanical gloves: <A href='?src=\ref[src];create=gloves;amount=1'>Make</A> ([250/efficiency])<BR>"
dat += "Utility belt: <A href='?src=\ref[src];create=tbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Security belt: <A href='?src=\ref[src];create=sbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Medical belt: <A href='?src=\ref[src];create=mbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Janitorial belt: <A href='?src=\ref[src];create=jbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Bandolier belt: <A href='?src=\ref[src];create=bbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Leather Satchel: <A href='?src=\ref[src];create=satchel;amount=1'>Make</A> ([400/efficiency])<BR>"
dat += "Leather Jacket: <A href='?src=\ref[src];create=jacket;amount=1'>Make</A> ([500/efficiency])<BR>"
dat += "</div>"
@@ -221,6 +229,12 @@
if(check_container_volume(10)) return 0
else if (check_cost(30/efficiency)) return 0
else beaker.reagents.add_reagent("cream",10)
if("cmilk")
if (check_cost(100/efficiency)) return 0
else new/obj/item/weapon/reagent_containers/food/drinks/milk(src.loc)
if("ccream")
if (check_cost(300/efficiency)) return 0
else new/obj/item/weapon/reagent_containers/food/drinks/bottle/cream(src.loc)
if("meat")
if (check_cost(250/efficiency)) return 0
else new/obj/item/weapon/reagent_containers/food/snacks/monkeycube(src.loc)
@@ -233,6 +247,12 @@
if("rh")
if (check_cost(25/efficiency)) return 0
else new/obj/item/weapon/reagent_containers/glass/bottle/nutrient/rh(src.loc)
if("wk")
if (check_cost(50/efficiency)) return 0
else new/obj/item/weapon/reagent_containers/glass/bottle/weedkiller(src.loc)
if("pk")
if (check_cost(50/efficiency)) return 0
else new/obj/item/weapon/reagent_containers/glass/bottle/pestkiller(src.loc)
if("wallet")
if (check_cost(100/efficiency)) return 0
else new/obj/item/weapon/storage/wallet(src.loc)
@@ -251,6 +271,18 @@
if("tbelt")
if (check_cost(300/efficiency)) return 0
else new/obj/item/weapon/storage/belt/utility(src.loc)
if("sbelt")
if (check_cost(300/efficiency)) return 0
else new/obj/item/weapon/storage/belt/security(src.loc)
if("mbelt")
if (check_cost(300/efficiency)) return 0
else new/obj/item/weapon/storage/belt/medical(src.loc)
if("jbelt")
if (check_cost(300/efficiency)) return 0
else new/obj/item/weapon/storage/belt/janitor(src.loc)
if("bbelt")
if (check_cost(300/efficiency)) return 0
else new/obj/item/weapon/storage/belt/bandolier(src.loc)
if("satchel")
if (check_cost(400/efficiency)) return 0
else new/obj/item/weapon/storage/backpack/satchel(src.loc)
+20 -2
View File
@@ -17,7 +17,7 @@
/obj/item/weapon/reagent_containers/spray/weedspray // -- Skie
desc = "It's a toxic mixture, in spray form, to kill small weeds."
icon = 'icons/obj/hydroponics.dmi'
name = "weed-spray"
name = "weed spray"
icon_state = "weedspray"
item_state = "spray"
volume = 100
@@ -39,7 +39,7 @@
/obj/item/weapon/reagent_containers/spray/pestspray // -- Skie
desc = "It's some pest eliminator spray! <I>Do not inhale!</I>"
icon = 'icons/obj/hydroponics.dmi'
name = "pest-spray"
name = "pest spray"
icon_state = "pestspray"
item_state = "spray"
volume = 100
@@ -118,3 +118,21 @@
/obj/item/weapon/reagent_containers/glass/bottle/nutrient/rh/New()
..()
reagents.add_reagent("robustharvestnutriment", 50)
/obj/item/weapon/reagent_containers/glass/bottle/weedkiller
name = "bottle of weed killer"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle19"
/obj/item/weapon/reagent_containers/glass/bottle/weedkiller/New()
..()
reagents.add_reagent("weedkiller", 50)
/obj/item/weapon/reagent_containers/glass/bottle/pestkiller
name = "bottle of pest spray"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle20"
/obj/item/weapon/reagent_containers/glass/bottle/pestkiller/New()
..()
reagents.add_reagent("pestkiller", 50)
+16 -4
View File
@@ -708,13 +708,25 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
return
if(!anchored && !isinspace())
user.visible_message("<span class='notice'>[user] begins to wrench [src] into place.</span>", \
"<span class='notice'>You begin to wrench [src] in place.</span>")
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
anchored = 1
user << "You wrench [src] in place."
if (do_after(user, 20))
if(anchored)
return
anchored = 1
user.visible_message("<span class='notice'>[user] wrenches [src] into place.</span>", \
"<span class='notice'>You wrench [src] in place.</span>")
else if(anchored)
user.visible_message("<span class='notice'>[user] begins to unwrench [src].</span>", \
"<span class='notice'>You begin to unwrench [src].</span>")
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
anchored = 0
user << "You unwrench [src]."
if (do_after(user, 20))
if(!anchored)
return
anchored = 0
user.visible_message("<span class='notice'>[user] unwrenches [src].</span>", \
"<span class='notice'>You unwrench [src].</span>")
else if(istype(O, /obj/item/weapon/screwdriver) && unwrenchable) //THIS NEED TO BE DONE DIFFERENTLY, SOMEONE REFACTOR THE TRAY CODE ALREADY
if(anchored)
+1 -1
View File
@@ -281,7 +281,7 @@
throw_speed = 3
throw_range = 5
w_class = 1.0
var/obj/machinery/librarycomp/computer //Associated computer - Modes 1 to 3 use this
var/obj/machinery/computer/libraryconsole/bookmanagement/computer //Associated computer - Modes 1 to 3 use this
var/obj/item/weapon/book/book //Currently scanned book
var/mode = 0 //0 - Scan only, 1 - Scan and Set Buffer, 2 - Scan and Attempt to Check In, 3 - Scan and Attempt to Add to Inventory
+30 -28
View File
@@ -17,23 +17,28 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
var/getdate
var/duedate
/*
* Library Public Computer
*/
/obj/machinery/librarypubliccomp
/obj/machinery/computer/libraryconsole
name = "library visitor console"
icon = 'icons/obj/library.dmi'
icon_state = "computer"
anchored = 1
density = 1
icon = 'icons/obj/computer.dmi'
icon_state = "library"
circuit = /obj/item/weapon/circuitboard/libraryconsole
var/screenstate = 0
var/title
var/category = "Any"
var/author
var/SQLquery
/obj/machinery/librarypubliccomp/attack_hand(var/mob/user as mob)
usr.set_machine(src)
/obj/machinery/computer/libraryconsole/attack_hand(var/mob/user as mob)
if(..())
return
interact(user)
/obj/machinery/computer/libraryconsole/interact(mob/user)
user.set_machine(src)
var/dat = "" // <META HTTP-EQUIV='Refresh' CONTENT='10'>
switch(screenstate)
if(0)
@@ -63,14 +68,13 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
dat += "<tr><td>[author]</td><td>[title]</td><td>[category]</td><td>[id]</td></tr>"
dat += "</table><BR>"
dat += "<A href='?src=\ref[src];back=1'>\[Go Back\]</A><BR>"
//user << browse(dat, "window=publiclibrary")
//onclose(user, "publiclibrary")
var/datum/browser/popup = new(user, "publiclibrary", name, 600, 400)
popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
/obj/machinery/librarypubliccomp/Topic(href, href_list)
/obj/machinery/computer/libraryconsole/Topic(href, href_list)
. = ..()
if(..())
usr << browse(null, "window=publiclibrary")
onclose(usr, "publiclibrary")
@@ -115,17 +119,12 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
/*
* Library Computer
* After 860 days, it's finally a buildable computer.
*/
// TODO: Make this an actual /obj/machinery/computer that can be crafted from circuit boards and such
// It is August 22nd, 2012... This TODO has already been here for months.. I wonder how long it'll last before someone does something about it.
/obj/machinery/librarycomp
/obj/machinery/computer/libraryconsole/bookmanagement
name = "book inventory management console"
icon = 'icons/obj/library.dmi'
icon_state = "computer"
anchored = 1
density = 1
var/arcanecheckout = 0
var/screenstate = 0 // 0 - Main Menu, 1 - Inventory, 2 - Checked Out, 3 - Check Out a Book
screenstate = 0 // 0 - Main Menu, 1 - Inventory, 2 - Checked Out, 3 - Check Out a Book
var/buffer_book
var/buffer_mob
var/upload_category = "Fiction"
@@ -134,10 +133,16 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
var/checkoutperiod = 5 // In minutes
var/obj/machinery/libraryscanner/scanner // Book scanner that will be used when uploading books to the Archive
var/bibledelay = 0 // LOL NO SPAM (1 minute delay) -- Doohl
var/bibledelay = 0
/obj/machinery/librarycomp/attack_hand(var/mob/user as mob)
usr.set_machine(src)
/obj/machinery/computer/libraryconsole/bookmanagement/New()
..()
if(circuit)
circuit.name = "circuit board (Book Inventory Management Console)"
circuit.build_path = /obj/machinery/computer/libraryconsole/bookmanagement
/obj/machinery/computer/libraryconsole/bookmanagement/interact(mob/user)
user.set_machine(src)
var/dat = "" // <META HTTP-EQUIV='Refresh' CONTENT='10'>
switch(screenstate)
if(0)
@@ -237,15 +242,12 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
dat += "<A href='?src=\ref[src];arccheckout=1'>Yes.</A><BR>"
dat += "<A href='?src=\ref[src];switchscreen=0'>No.</A><BR>"
//dat += "<A HREF='?src=\ref[user];mach_close=library'>Close</A><br><br>"
//user << browse(dat, "window=library")
//onclose(user, "library")
var/datum/browser/popup = new(user, "library", name, 600, 400)
popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
/obj/machinery/librarycomp/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/computer/libraryconsole/bookmanagement/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/barcodescanner))
var/obj/item/weapon/barcodescanner/scanner = W
scanner.computer = src
@@ -254,11 +256,11 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
else
..()
/obj/machinery/librarycomp/emag_act(mob/user as mob)
/obj/machinery/computer/libraryconsole/bookmanagement/emag_act(mob/user as mob)
if(density && !emagged)
emagged = 1
/obj/machinery/librarycomp/Topic(href, href_list)
/obj/machinery/computer/libraryconsole/bookmanagement/Topic(href, href_list)
if(..())
usr << browse(null, "window=library")
onclose(usr, "library")
@@ -394,7 +396,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
src.updateUsrDialog()
return
/obj/machinery/librarycomp/say_quote(text)
/obj/machinery/computer/libraryconsole/bookmanagement/say_quote(text)
return "flashes, \"[text]\""
@@ -95,6 +95,9 @@
/mob/living/carbon/alien/humanoid/hunter/throw_impact(A)
var/msg = ""
if(!leaping)
return ..()
if(A)
if(istype(A, /mob/living))
var/mob/living/L = A
@@ -162,7 +165,5 @@
src.throwing = 0
if(isobj(src))
src.throw_impact(get_turf(src))
return 1
@@ -81,5 +81,5 @@
if (m_type & 1)
visible_message(message)
else
src.loc.audible_message(message)
audible_message(message)
return
@@ -107,5 +107,5 @@
if (m_type & 1)
visible_message(message)
else
src.loc.audible_message(message)
audible_message(message)
return
@@ -69,4 +69,4 @@
if (m_type & 1)
visible_message(message)
else if (m_type & 2)
src.loc.audible_message(message)
audible_message(message)
+1 -1
View File
@@ -195,4 +195,4 @@
if (m_type & 1)
visible_message(message)
else if (m_type & 2)
src.loc.audible_message(message)
audible_message(message)
@@ -342,5 +342,5 @@
if (m_type & 1)
visible_message(message)
else if (m_type & 2)
src.loc.audible_message(message)
audible_message(message)
@@ -38,6 +38,8 @@
if(shoes)
if(!lying)
if(loc == NewLoc)
if(!has_gravity(loc))
return
var/obj/item/clothing/shoes/S = shoes
S.step_action()
@@ -77,5 +77,5 @@
if (m_type & 1)
visible_message(message)
else
src.loc.audible_message(message)
audible_message(message)
return
@@ -82,7 +82,7 @@
if (m_type & 1)
visible_message(message)
else
src.loc.audible_message(message)
audible_message(message)
if (regenerate_icons)
regenerate_icons()
+1 -1
View File
@@ -275,4 +275,4 @@
if (m_type & 1)
visible_message(message)
else if (m_type & 2)
src.loc.audible_message(message)
audible_message(message)
@@ -205,5 +205,5 @@
if (m_type & 1)
visible_message(message)
else
src.loc.audible_message(message)
audible_message(message)
return
@@ -46,6 +46,10 @@
projectilesound = 'sound/weapons/Gunshot.ogg'
casingtype = /obj/item/ammo_casing/a357
/mob/living/simple_animal/hostile/russian/ranged/New()
if(prob(50) && ispath(weapon1,/obj/item/weapon/gun/projectile/revolver/mateba)) //to preserve varedits
weapon1 = /obj/item/weapon/gun/projectile/shotgun/boltaction
casingtype = /obj/item/ammo_casing/a762
/mob/living/simple_animal/hostile/russian/Die()
..()
@@ -54,4 +58,4 @@
if(weapon1)
new weapon1 (src.loc)
qdel(src)
return
return
+1
View File
@@ -157,5 +157,6 @@
var/force_compose = 0 //If this is nonzero, the mob will always compose it's own hear message instead of using the one given in the arguments.
var/obj/control_object //Used by admins to possess objects. All mobs should have this var
var/atom/movable/remote_control //Calls relaymove() to whatever it is
var/turf/listed_turf = null //the current turf being examined in the stat panel
+3
View File
@@ -116,6 +116,9 @@
if(mob.buckled) //if we're buckled to something, tell it we moved.
return mob.buckled.relaymove(mob, direct)
if(mob.remote_control) //we're controlling something, our movement is relayed to it
return mob.remote_control.relaymove(mob, direct)
if(!mob.canmove)
return 0
+43 -26
View File
@@ -84,7 +84,7 @@
inturf = get_step(src, dir)
spawn(5)
turbine = locate() in get_step(src, get_dir(inturf, src))
locate_machinery()
if(!turbine)
stat |= BROKEN
@@ -98,6 +98,13 @@
// /obj/machinery/power/compressor/CanPass(atom/movable/mover, turf/target, height=0)
// return !density
/obj/machinery/power/compressor/locate_machinery()
if(turbine)
return
turbine = locate() in get_step(src, get_dir(inturf, src))
if(turbine)
turbine.locate_machinery()
/obj/machinery/power/compressor/RefreshParts()
var/E = 0
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
@@ -111,7 +118,7 @@
if(default_change_direction_wrench(user, I))
turbine = null
inturf = get_step(src, dir)
turbine = locate() in get_step(src, get_dir(inturf, src))
locate_machinery()
if(turbine)
user << "<span class='notice'>Turbine connected.</span>"
stat &= ~BROKEN
@@ -129,14 +136,14 @@
return !density
/obj/machinery/power/compressor/process()
if(!turbine)
stat = BROKEN
if(stat & BROKEN || panel_open)
return
if(!starter)
return
overlays.Cut()
if(stat & BROKEN)
return
if(!turbine)
stat |= BROKEN
return
rpm = 0.9* rpm + 0.1 * rpmtarget
var/datum/gas_mixture/environment = inturf.return_air()
@@ -199,7 +206,7 @@
// compressor is found in the opposite direction
compressor = locate() in get_step(src, get_dir(outturf, src))
locate_machinery()
if(!compressor)
stat |= BROKEN
@@ -218,15 +225,22 @@
P += C.rating
productivity = P / 6
/obj/machinery/power/turbine/locate_machinery()
if(compressor)
return
compressor = locate() in get_step(src, get_dir(outturf, src))
if(compressor)
compressor.locate_machinery()
/obj/machinery/power/turbine/CanAtmosPass(var/turf/T)
return !density
/obj/machinery/power/turbine/process()
if(stat & BROKEN)
return
if(!compressor)
stat |= BROKEN
stat = BROKEN
if((stat & BROKEN) || panel_open)
return
if(!compressor.starter)
return
@@ -274,7 +288,7 @@
if(default_change_direction_wrench(user, I))
compressor = null
outturf = get_step(src, dir)
compressor = locate() in get_step(src, get_dir(outturf, src))
locate_machinery()
if(compressor)
user << "<span class='notice'>Compressor connected.</span>"
stat &= ~BROKEN
@@ -341,9 +355,9 @@
/obj/machinery/computer/turbine_computer/New()
..()
spawn(5)
search_turbine()
locate_machinery()
/obj/machinery/computer/turbine_computer/proc/search_turbine()
/obj/machinery/computer/turbine_computer/locate_machinery()
compressor = locate(/obj/machinery/power/compressor) in range(5)
/obj/machinery/computer/turbine_computer/attack_hand(var/mob/user as mob)
@@ -356,17 +370,20 @@
var/dat
if(compressor && compressor.turbine)
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];close=1'>Close</A>
\n<BR>
\n"}
dat += "<BR><B>Gas turbine remote control system</B><HR>"
if(compressor.stat || compressor.turbine.stat)
dat += "[compressor.stat ? "<B>Compressor is inoperable</B><BR>" : "<B>Turbine is inoperable</B>"]"
else
dat += {"Turbine 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];close=1'>Close</A>
\n<BR>
\n"}
else
dat += "<B>There is [!compressor ? "no compressor" : " compressor[!compressor.turbine ? " and no turbine" : ""]"].</B><BR>"
dat += "<B>There is [!compressor ? "no compressor" : " compressor[!compressor.turbine ? " but no turbine" : ""]"].</B><BR>"
if(!compressor)
dat += "<A href='?src=\ref[src];search=1'>Search for compressor</A>"
@@ -380,14 +397,14 @@
return
else if( href_list["str"] )
if(compressor)
if(compressor && compressor.turbine)
compressor.starter = !compressor.starter
else if( href_list["close"] )
usr << browse(null, "window=turbinecomputer")
usr.unset_machine(src)
return
else if(href_list["search"])
search_turbine()
locate_machinery()
src.updateUsrDialog()
return
@@ -133,6 +133,7 @@
/obj/item/ammo_casing/a762
desc = "A 7.62mm bullet casing."
icon_state = "762-casing"
caliber = "a762"
projectile_type = /obj/item/projectile/bullet
@@ -165,10 +166,11 @@
icon_state = "40mmHE"
projectile_type = /obj/item/projectile/bullet/a40mm
/obj/item/ammo_casing/caseless/bolt //xbow
name = "poison crossbow bolt"
desc = "A reusable crossbow bolt tipped with specialized carpotoxin."
projectile_type = /obj/item/projectile/energy/bolt
caliber = "crossbow"
icon = 'icons/obj/projectiles.dmi'
icon_state = "cbbolt"
/obj/item/ammo_casing/caseless/magspear
name = "magnetic spear"
desc = "A reusable spear that is typically loaded into kinetic spearguns."
projectile_type = /obj/item/projectile/bullet/magspear
caliber = "speargun"
icon_state = "magspear"
throwforce = 15 //still deadly when thrown
throw_speed = 3
+7 -5
View File
@@ -40,8 +40,10 @@
max_ammo = 4
multiple_sprites = 1
/obj/item/ammo_box/crossbow
name = "ammo box (crossbow bolts)"
icon_state = "xbow"
ammo_type = /obj/item/ammo_casing/caseless/bolt
max_ammo = 4
/obj/item/ammo_box/a762
name = "stripper clip (7.62mm)"
desc = "A stripper clip."
icon_state = "762"
ammo_type = /obj/item/ammo_casing/a762
max_ammo = 5
multiple_sprites = 1
+29 -1
View File
@@ -38,6 +38,24 @@
select_name = "DESTROY"
fire_sound = 'sound/weapons/pulse.ogg'
/obj/item/ammo_casing/energy/laser/pulse/carbine
e_cost = 1000
/obj/item/ammo_casing/energy/laser/carbine
e_cost = 1000
/obj/item/ammo_casing/energy/electrode/carbine
e_cost = 1000
/obj/item/ammo_casing/energy/laser/pulse/pistol
e_cost = 2000
/obj/item/ammo_casing/energy/laser/pistol
e_cost = 1000
/obj/item/ammo_casing/energy/electrode/pistol
e_cost = 1000
/obj/item/ammo_casing/energy/laser/bluetag
projectile_type = /obj/item/projectile/lasertag/bluetag
select_name = "bluetag"
@@ -124,4 +142,14 @@
/obj/item/ammo_casing/energy/wormhole/orange
projectile_type = /obj/item/projectile/beam/wormhole/orange
select_name = "orange"
select_name = "orange"
/obj/item/ammo_casing/energy/bolt
projectile_type = /obj/item/projectile/energy/bolt
select_name = "bolt"
e_cost = 500
fire_sound = 'sound/weapons/Genhit.ogg'
/obj/item/ammo_casing/energy/bolt/large
projectile_type = /obj/item/projectile/energy/bolt/large
select_name = "heavy bolt"
@@ -90,14 +90,19 @@
ammo_type = /obj/item/ammo_casing/a40mm
max_ammo = 6
/obj/item/ammo_box/magazine/internal/cylinder/crossbow
name = "autocrossbow internal magazine"
ammo_type = /obj/item/ammo_casing/caseless/bolt
caliber = "crossbow"
max_ammo = 10
/obj/item/ammo_box/magazine/internal/cylinder/speargun
name = "speargun internal magazine"
ammo_type = /obj/item/ammo_casing/caseless/magspear
caliber = "speargun"
max_ammo = 1
/obj/item/ammo_box/magazine/internal/cylinder/crossbow/large
max_ammo = 15
/obj/item/ammo_box/magazine/internal/boltaction
name = "bolt action rifle internal magazine"
desc = "Oh god, this shouldn't be here"
ammo_type = /obj/item/ammo_casing/a762
caliber = "a762"
max_ammo = 5
multiload = 1
///////////EXTERNAL MAGAZINES////////////////
@@ -211,4 +216,4 @@ obj/item/ammo_box/magazine/tommygunm45
/obj/item/ammo_box/magazine/m12g/dragon
name = "shotgun magazine (12g dragon's breath)"
icon_state = "m12gf"
ammo_type = /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath
ammo_type = /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath
+40 -7
View File
@@ -30,25 +30,43 @@
var/sawn_state = SAWN_INTACT
var/burst_size = 1
var/fire_delay = 0
var/obj/item/device/firing_pin/pin = /obj/item/device/firing_pin //standard firing pin for most guns
var/obj/item/device/flashlight/F = null
var/can_flashlight = 0
/obj/item/weapon/gun/New()
..()
if(pin)
pin = new pin(src)
/obj/item/weapon/gun/examine(mob/user)
..()
if(pin)
user << "It has a [pin] installed."
else
user << "It doesn't have a firing pin installed, and won't fire."
/obj/item/weapon/gun/proc/process_chamber()
return 0
/obj/item/weapon/gun/proc/special_check(var/mob/M) //Placeholder for any special checks, like detective's revolver.
return 1
//check if there's enough ammo/energy/whatever to shoot one time
//i.e if clicking would make it shoot
/obj/item/weapon/gun/proc/can_shoot()
return 1
/obj/item/weapon/gun/proc/shoot_with_empty_chamber(mob/living/user as mob|obj)
user << "<span class='danger'>*click*</span>"
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
return
/obj/item/weapon/gun/proc/shoot_live_shot(mob/living/user as mob|obj, var/pointblank = 0, var/mob/pbtarget = null, var/message = 1)
if(recoil)
spawn()
@@ -65,10 +83,12 @@
else
user.visible_message("<span class='danger'>[user] fires [src]!</span>", "<span class='danger'>You fire [src]!</span>", "You hear a [istype(src, /obj/item/weapon/gun/energy) ? "laser blast" : "gunshot"]!")
/obj/item/weapon/gun/emp_act(severity)
for(var/obj/O in contents)
O.emp_act(severity)
/obj/item/weapon/gun/afterattack(atom/target as mob|obj|turf, mob/living/carbon/human/user as mob|obj, flag, params)//TODO: go over this
if(flag) //It's adjacent, is the user, or is on the user's person
if(istype(target, /mob/) && target != user && !(target in user.contents)) //We make sure that it is a mob, it's not us or part of us.
@@ -94,11 +114,13 @@
process_fire(target,user,1,params)
/obj/item/weapon/gun/proc/can_trigger_gun(mob/living/carbon/user)
if (!user.IsAdvancedToolUser())
user << "<span class='notice'>You don't have the dexterity to do this!</span>"
return 0
if(trigger_guard)
if(istype(user) && user.dna)
if(user.dna.check_mutation(HULK))
@@ -109,12 +131,24 @@
return 0
return 1
/obj/item/weapon/gun/proc/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, var/message = 1, params)
/obj/item/weapon/gun/proc/handle_pins(mob/living/user)
if(pin)
if(pin.pin_auth(user) || pin.emagged)
return 1
else
user << "<span class='warning'>INVALID USER.</span>"
return 0
else
user << "<span class='notice'>\The [src]'s trigger is locked. This weapon doesn't have a firing pin installed!</span>"
return 0
/obj/item/weapon/gun/proc/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, var/message = 1, params)
add_fingerprint(user)
if(!special_check(user))
return
if(!handle_pins(user))
return 0
for(var/i = 1 to burst_size)
if(!issilicon(user))
@@ -125,8 +159,6 @@
shoot_with_empty_chamber(user)
break
else
if(!special_check(user))
return
if(get_dist(user, target) <= 1) //Making sure whether the target is in vicinity for the pointblank shot
shoot_live_shot(user, 1, target, message)
else
@@ -143,6 +175,7 @@
else
user.update_inv_r_hand(0)
/obj/item/weapon/gun/attack(mob/M as mob, mob/user)
if(user.a_intent == "harm") //Flogging
..()
+4 -21
View File
@@ -84,7 +84,7 @@ obj/item/weapon/gun/energy/laser/retro
slot_flags = SLOT_BACK
origin_tech = "combat=4;materials=3;powerstorage=3"
ammo_type = list(/obj/item/ammo_casing/energy/laser/heavy)
pin = null
/obj/item/weapon/gun/energy/xray
name = "xray laser gun"
@@ -93,7 +93,7 @@ obj/item/weapon/gun/energy/laser/retro
item_state = "laser"
origin_tech = "combat=5;materials=3;magnets=2;syndicate=2"
ammo_type = list(/obj/item/ammo_casing/energy/xray)
pin = null
////////Laser Tag////////////////////
@@ -105,24 +105,16 @@ obj/item/weapon/gun/energy/laser/retro
origin_tech = "combat=1;magnets=2"
clumsy_check = 0
var/charge_tick = 0
/obj/item/weapon/gun/energy/laser/bluetag/special_check(var/mob/living/carbon/human/M)
if(ishuman(M))
if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag))
return 1
M << "<span class='danger'>You need to be wearing your laser tag vest!</span>"
return 0
pin = /obj/item/device/firing_pin/tag/blue
/obj/item/weapon/gun/energy/laser/bluetag/New()
..()
SSobj.processing.Add(src)
/obj/item/weapon/gun/energy/laser/bluetag/Destroy()
SSobj.processing.Remove(src)
..()
/obj/item/weapon/gun/energy/laser/bluetag/process()
charge_tick++
if(charge_tick < 4)
@@ -135,7 +127,6 @@ obj/item/weapon/gun/energy/laser/retro
return 1
/obj/item/weapon/gun/energy/laser/redtag
name = "laser tag gun"
icon_state = "redtag"
@@ -144,24 +135,16 @@ obj/item/weapon/gun/energy/laser/retro
origin_tech = "combat=1;magnets=2"
clumsy_check = 0
var/charge_tick = 0
/obj/item/weapon/gun/energy/laser/redtag/special_check(var/mob/living/carbon/human/M)
if(ishuman(M))
if(istype(M.wear_suit, /obj/item/clothing/suit/redtag))
return 1
M << "<span class='danger'>You need to be wearing your laser tag vest!</span>"
return 0
pin = /obj/item/device/firing_pin/tag/red
/obj/item/weapon/gun/energy/laser/redtag/New()
..()
SSobj.processing.Add(src)
/obj/item/weapon/gun/energy/laser/redtag/Destroy()
SSobj.processing.Remove(src)
..()
/obj/item/weapon/gun/energy/laser/redtag/process()
charge_tick++
if(charge_tick < 4)
@@ -22,6 +22,7 @@
modifystate = 0
ammo_type = list(/obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
can_flashlight = 0
pin = null
/obj/item/weapon/gun/energy/gun/nuclear/New()
..()
@@ -110,4 +111,4 @@
/obj/item/weapon/gun/energy/gun/turret
name = "hybrid turret gun"
desc = "A basic hybrid energy gun with two settings: Stun and kill."
ammo_type = list(/obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
ammo_type = list(/obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
@@ -14,6 +14,22 @@
/obj/item/weapon/gun/energy/pulse_rifle/attack_self(mob/living/user as mob)
select_fire(user)
/obj/item/weapon/gun/energy/pulse_rifle/pulse_carbine
name = "pulse carbine"
desc = "A ligther weight varient of the pulse rifle, a multifaceted energy carbine with three modes."
w_class = 3.0
icon_state = "pulse_carbine"
item_state = "pulse"
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse/carbine, /obj/item/ammo_casing/energy/electrode/carbine, /obj/item/ammo_casing/energy/laser/carbine)
/obj/item/weapon/gun/energy/pulse_rifle/pulse_pistol
name = "pulse pistol"
desc = "A ligther weight varient of the pulse rifle, a multifaceted energy pistol with three modes."
w_class = 2.0
icon_state = "pulse_pistol"
item_state = "pulse"
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse/pistol, /obj/item/ammo_casing/energy/electrode/pistol, /obj/item/ammo_casing/energy/laser/pistol)
/obj/item/weapon/gun/energy/pulse_rifle/destroyer
name = "pulse destroyer"
desc = "A heavy-duty energy rifle built for pure destruction."
@@ -8,6 +8,7 @@
flags = CONDUCT
slot_flags = SLOT_BACK
ammo_type = list(/obj/item/ammo_casing/energy/ion)
pin = null
/obj/item/weapon/gun/energy/ionrifle/emp_act(severity)
@@ -19,6 +20,7 @@
icon_state = "decloner"
origin_tech = "combat=5;materials=4;powerstorage=3"
ammo_type = list(/obj/item/ammo_casing/energy/declone)
pin = null
/obj/item/weapon/gun/energy/floragun
name = "floral somatoray"
@@ -119,15 +121,39 @@
recent_reload = 0
..()
/obj/item/weapon/gun/energy/kinetic_accelerator/attack_self(var/mob/living/user/L)
/obj/item/weapon/gun/energy/kinetic_accelerator/attack_self(mob/living/user)
if(overheat || recent_reload)
return
power_supply.give(500)
playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1)
if(!suppressed)
playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1)
else
playsound(user, 'sound/weapons/kenetic_reload.ogg', 60, 1)
recent_reload = 1
update_icon()
return
/obj/item/weapon/gun/energy/kinetic_accelerator/crossbow
name = "mini energy crossbow"
desc = "A weapon favored by syndicate stealth specialists."
icon_state = "crossbow"
item_state = "crossbow"
w_class = 2
m_amt = 2000
origin_tech = "combat=2;magnets=2;syndicate=5"
suppressed = 1
ammo_type = list(/obj/item/ammo_casing/energy/bolt)
/obj/item/weapon/gun/energy/kinetic_accelerator/crossbow/large
name = "energy crossbow"
desc = "A reverse engineered weapon using syndicate technology."
icon_state = "crossbowlarge"
w_class = 3
m_amt = 4000
origin_tech = "combat=2;magnets=2;syndicate=3" //can be further researched for more syndie tech
suppressed = 0
ammo_type = list(/obj/item/ammo_casing/energy/bolt/large)
/obj/item/weapon/gun/energy/disabler
name = "disabler"
desc = "A self-defense weapon that exhausts organic targets, weakening them until they collapse."
@@ -13,6 +13,7 @@
origin_tech = "combat=3;materials=3;powerstorage=2"
ammo_type = list(/obj/item/ammo_casing/energy/electrode/gun)
can_flashlight = 0
pin = null
/obj/item/weapon/gun/energy/gun/advtaser
name = "hybrid taser"
@@ -5,6 +5,7 @@
origin_tech = "combat=3;materials=4;powerstorage=3;magnets=2"
ammo_type = list(/obj/item/ammo_casing/energy/temp, /obj/item/ammo_casing/energy/temp/hot)
cell_type = "/obj/item/weapon/stock_parts/cell/high"
pin = null
/obj/item/weapon/gun/energy/temperature/attack_self(mob/living/user as mob)
@@ -8,7 +8,7 @@
var/alarmed = 0
can_suppress = 1
burst_size = 3
fire_delay = 1
fire_delay = 2
var/select = 1
action_button_name = "Toggle Firemode"
@@ -47,7 +47,7 @@
/obj/item/weapon/gun/projectile/automatic/proc/burst_select()
var/mob/living/carbon/human/user = usr
select = !select
if(select)
if(!select)
burst_size = 1
fire_delay = 0
user << "<span class='notice'>You switch to semi-automatic.</span>"
@@ -80,6 +80,7 @@
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
fire_delay = 2
burst_size = 2
pin = /obj/item/device/firing_pin/implant/pindicate
/obj/item/weapon/gun/projectile/automatic/c20r/New()
..()
@@ -112,6 +113,7 @@
can_suppress = 0
burst_size = 5
fire_delay = 3
pin = /obj/item/device/firing_pin/implant/pindicate
/obj/item/weapon/gun/projectile/automatic/l6_saw/attack_self(mob/user as mob)
cover_open = !cover_open
@@ -165,6 +167,7 @@
var/obj/item/weapon/gun/projectile/revolver/grenadelauncher/underbarrel
burst_size = 3
fire_delay = 2
pin = /obj/item/device/firing_pin/implant/pindicate
/obj/item/weapon/gun/projectile/automatic/m90/New()
..()
@@ -230,4 +233,5 @@
mag_type = /obj/item/ammo_box/magazine/tommygunm45
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
can_suppress = 0
burst_size = 4
burst_size = 4
fire_delay = 1
@@ -44,44 +44,33 @@
icon_state = "[initial(icon_state)][magazine ? "loaded" : ""]"
return
/obj/item/weapon/gun/projectile/automatic/crossbow
name = "mini auto-crossbow"
desc = "A weapon favored by syndicate stealth specialists. Fires specialized poison bolts."
icon_state = "crossbow"
item_state = "crossbow"
w_class = 2
m_amt = 2000
origin_tech = "combat=2;magnets=2;syndicate=5"
suppressed = 1
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/crossbow
fire_sound = 'sound/weapons/genhit.ogg'
/obj/item/weapon/gun/projectile/automatic/speargun
name = "kinetic speargun"
desc = "A weapon favored by carp hunters. Fires specialized spears using kinetic energy."
icon_state = "speargun"
item_state = "misteratmos" //professional asset reuse
w_class = 4
force = 10
can_suppress = 0
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/speargun
fire_sound = 'sound/weapons/grenadelaunch.ogg'
burst_size = 1
fire_delay = 0
select = 0
action_button_name = null
/obj/item/weapon/gun/projectile/automatic/crossbow/update_icon()
/obj/item/weapon/gun/projectile/automatic/speargun/update_icon()
return
/obj/item/weapon/gun/projectile/automatic/crossbow/attack_self()
/obj/item/weapon/gun/projectile/automatic/speargun/attack_self()
return
/obj/item/weapon/gun/projectile/automatic/crossbow/process_chamber(var/eject_casing = 0, var/empty_chamber = 1)
/obj/item/weapon/gun/projectile/automatic/speargun/process_chamber(var/eject_casing = 0, var/empty_chamber = 1)
..()
/obj/item/weapon/gun/projectile/automatic/crossbow/attackby(var/obj/item/A, mob/user)
/obj/item/weapon/gun/projectile/automatic/speargun/attackby(var/obj/item/A, mob/user)
var/num_loaded = magazine.attackby(A, user, 1)
if(num_loaded)
user << "<span class='notice'>You load [num_loaded] bolt\s into \the [src].</span>"
user << "<span class='notice'>You load [num_loaded] spear\s into \the [src].</span>"
update_icon()
chamber_round()
/obj/item/weapon/gun/projectile/automatic/crossbow/large //holds twice the ammo of mini crossbows but can't be pocketed
name = "auto crossbow"
desc = "A weapon favored by carp hunters. Fires specialized poison bolts."
icon_state = "crossbowlarge"
w_class = 3
force = 10
m_amt = 4000
suppressed = 0
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/crossbow/large
chamber_round()
@@ -21,6 +21,7 @@
icon_state = "m1911"
w_class = 3
mag_type = /obj/item/ammo_box/magazine/m45
can_suppress = 0
/obj/item/weapon/gun/projectile/automatic/pistol/deagle
name = "desert eagle"
@@ -28,6 +29,7 @@
icon_state = "deagle"
force = 14
mag_type = /obj/item/ammo_box/magazine/m50
can_suppress = 0
/obj/item/weapon/gun/projectile/automatic/pistol/deagle/update_icon()
..()
@@ -58,17 +58,17 @@
origin_tech = "combat=2;materials=2"
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/rev38
/obj/item/weapon/gun/projectile/revolver/detective/special_check(var/mob/living/carbon/human/M)
if(magazine.caliber == initial(magazine.caliber))
return 1
if(prob(70 - (magazine.ammo_count() * 10))) //minimum probability of 10, maximum of 60
playsound(M, fire_sound, 50, 1)
M << "<span class='danger'>[src] blows up in your face!</span>"
M.take_organ_damage(0,20)
M.drop_item()
qdel(src)
return 0
return 1
/obj/item/weapon/gun/projectile/revolver/detective/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, var/message = 1, params)
if(magazine.caliber != initial(magazine.caliber))
if(prob(70 - (magazine.ammo_count() * 10))) //minimum probability of 10, maximum of 60
playsound(user, fire_sound, 50, 1)
user << "<span class='danger'>[src] blows up in your face!</span>"
user.take_organ_damage(0,20)
user.drop_item()
qdel(src)
return 0
..()
/obj/item/weapon/gun/projectile/revolver/detective/verb/rename_gun()
set name = "Name Gun"
@@ -10,7 +10,6 @@
origin_tech = "combat=4;materials=2"
mag_type = /obj/item/ammo_box/magazine/internal/shot
var/recentpump = 0 // to prevent spammage
var/pumped = 0
/obj/item/weapon/gun/projectile/shotgun/attackby(var/obj/item/A as obj, mob/user as mob)
var/num_loaded = magazine.attackby(A, user, 1)
@@ -41,22 +40,30 @@
/obj/item/weapon/gun/projectile/shotgun/proc/pump(mob/M)
playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1)
pumped = 0
pump_unload(M)
pump_reload(M)
update_icon() //I.E. fix the desc
return 1
/obj/item/weapon/gun/projectile/shotgun/proc/pump_unload(mob/M)
if(chambered)//We have a shell in the chamber
chambered.loc = get_turf(src)//Eject casing
chambered.SpinAnimation(5, 1)
chambered = null
/obj/item/weapon/gun/projectile/shotgun/proc/pump_reload(mob/M)
if(!magazine.ammo_count()) return 0
var/obj/item/ammo_casing/AC = magazine.get_round() //load next casing.
chambered = AC
update_icon() //I.E. fix the desc
return 1
/obj/item/weapon/gun/projectile/shotgun/examine(mob/user)
..()
if (chambered)
user << "A [chambered.BB ? "live" : "spent"] one is in the chamber."
// COMBAT SHOTGUN //
/obj/item/weapon/gun/projectile/shotgun/combat
name = "combat shotgun"
desc = "A traditional shotgun with tactical furniture and an eight-shell capacity underneath."
@@ -65,6 +72,8 @@
mag_type = /obj/item/ammo_box/magazine/internal/shotcom
w_class = 5
// RIOT SHOTGUN //
/obj/item/weapon/gun/projectile/shotgun/riot //for spawn in the armory
name = "riot shotgun"
desc = "A sturdy shotgun with a longer magazine and a fixed tactical stock designed for non-lethal riot control."
@@ -81,6 +90,43 @@
if(W.active)
sawoff(user)
///////////////////////
// BOLT ACTION RIFLE //
///////////////////////
/obj/item/weapon/gun/projectile/shotgun/boltaction
name = "bolt action rifle"
desc = "This piece of junk looks like something that could have been used 700 years ago."
icon_state = "moistnugget"
item_state = "moistnugget"
slot_flags = 0 //no SLOT_BACK sprite, alas
mag_type = /obj/item/ammo_box/magazine/internal/boltaction
var/bolt_open = 0
/obj/item/weapon/gun/projectile/shotgun/boltaction/pump(mob/M)
playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1)
if(bolt_open)
pump_reload(M)
else
pump_unload(M)
bolt_open = !bolt_open
update_icon() //I.E. fix the desc
return 1
/obj/item/weapon/gun/projectile/shotgun/boltaction/attackby(var/obj/item/A as obj, mob/user as mob)
if(!bolt_open)
user << "<span class='notice'>The bolt is closed!</span>"
return
. = ..()
/obj/item/weapon/gun/projectile/shotgun/boltaction/examine(mob/user)
..()
user << "The bolt is [bolt_open ? "open" : "closed"]."
/////////////////////////////
// DOUBLE BARRELED SHOTGUN //
/////////////////////////////
/obj/item/weapon/gun/projectile/revolver/doublebarrel
name = "double-barreled shotgun"
desc = "A true classic."
@@ -196,7 +242,7 @@
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog
name = "syndicate shotgun"
desc = "A compact, mag-fed burst-fire shotgun for combat in narrow corridors, nicknamed 'Bulldog' by boarding parties. Compatible only with specialized 8-round drum magazines."
desc = "A semi-auto, mag-fed shotgun for combat in narrow corridors, nicknamed 'Bulldog' by boarding parties. Compatible only with specialized 8-round drum magazines."
icon_state = "bulldog"
item_state = "bulldog"
w_class = 3.0
@@ -206,22 +252,27 @@
can_suppress = 0
burst_size = 1
fire_delay = 0
pin = /obj/item/device/firing_pin/implant/pindicate
action_button_name = null
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/New()
..()
update_icon()
return
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/proc/update_magazine()
if(magazine)
src.overlays = 0
overlays += "[magazine.icon_state]"
return
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/update_icon()
src.overlays = 0
update_magazine()
icon_state = "bulldog[chambered ? "" : "-e"]"
return
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/afterattack()
..()
empty_alarm()
return
return
+86
View File
@@ -0,0 +1,86 @@
/obj/item/device/firing_pin
name = "electronic firing pin"
desc = "A small authentication device, to be inserted into a firearm reciever to allow operation. NT safety regulations require all new designs to incorporate one."
icon = 'icons/obj/device.dmi'
icon_state = "firing_pin"
item_state = "pen"
flags = CONDUCT
w_class = 1
attack_verb = list("poked")
var/emagged = 0
/obj/item/device/firing_pin/afterattack(atom/target, mob/user, proximity_flag)
if(proximity_flag)
if(istype(target, /obj/item/weapon/gun))
var/obj/item/weapon/gun/G = target
if(!G.pin)
user.drop_item()
G.pin = src
loc = G
else
user << "<span class ='notice'>This firearm already has a firing pin installed.</span>"
/obj/item/device/firing_pin/emag_act(mob/user)
if(!emagged)
emagged = 1
user << "<span class='notice'>You override the authentication mechanism.</span>"
/obj/item/device/firing_pin/proc/pin_auth(mob/living/user)
return 1
/obj/item/device/firing_pin/test_range
name = "test-range firing pin"
desc = "This safety firing pin allows weapons to be fired within proximity to a firing range."
/obj/item/device/firing_pin/test_range/pin_auth(mob/living/user)
for(var/obj/machinery/magnetic_controller/M in range(user, 3))
return 1
return 0
/obj/item/device/firing_pin/implant
name = "implant-keyed firing pin"
desc = "This is a security firing pin which only authorizes users who are implanted with a certain device."
var/obj/item/weapon/implant/req_implant = null
/obj/item/device/firing_pin/implant/pin_auth(mob/living/user)
for(req_implant in user)
if(req_implant && req_implant.imp_in == user)
return 1
return 0
/obj/item/device/firing_pin/implant/loyalty
name = "loyalty firing pin"
desc = "This is a security firing pin which only authorizes users who are loyalty-implanted."
icon_state = "firing_pin_loyalty"
req_implant = /obj/item/weapon/implant/loyalty
/obj/item/device/firing_pin/implant/pindicate
name = "syndicate firing pin"
icon_state = "firing_pin_pindi"
req_implant = /obj/item/weapon/implant/weapons_auth
//muh laser tag
/obj/item/device/firing_pin/tag
name = "laser tag firing pin"
desc = "A recreational firing pin, used in laser tag units to ensure users have their vests on."
var/obj/item/clothing/suit/suit_requirement = null
/obj/item/device/firing_pin/tag/pin_auth(mob/living/user)
if(ishuman(user))
var/mob/living/carbon/human/M = user
if(istype(M.wear_suit, suit_requirement))
return 1
user << "<span class='warning'>You need to be wearing [suit_requirement.name]!</span>"
return 0
/obj/item/device/firing_pin/tag/red
name = "red laser tag firing pin"
icon_state = "firing_pin_red"
suit_requirement = /obj/item/clothing/suit/redtag
/obj/item/device/firing_pin/tag/blue
name = "blue laser tag firing pin"
icon_state = "firing_pin_blue"
suit_requirement = /obj/item/clothing/suit/bluetag
+3 -11
View File
@@ -51,7 +51,7 @@
weaken = 5
range = 7
/obj/item/projectile/energy/bolt //xbow bolts
/obj/item/projectile/energy/bolt //ebow bolts
name = "bolt"
icon_state = "cbbolt"
damage = 15
@@ -61,13 +61,5 @@
stutter = 5
range = 7
/obj/item/projectile/energy/bolt/on_hit(var/atom/target, var/blocked = 0) //drop a bolt on hitting basically anything
if(!proj_hit)
proj_hit = 1
new /obj/item/ammo_casing/caseless/bolt(src.loc)
..()
/obj/item/projectile/energy/bolt/on_range() //drop a bolt after 7 tiles
if(!proj_hit)
new /obj/item/ammo_casing/caseless/bolt(src.loc)
..()
/obj/item/projectile/energy/bolt/large
damage = 20
@@ -178,3 +178,20 @@ obj/item/projectile/kinetic/New()
name ="explosive slug"
damage = 25
weaken = 5
/obj/item/projectile/bullet/magspear
name = "magnetic spear"
desc = "WHITE WHALE, HOLY GRAIL"
damage = 30 //takes 3 spears to kill a mega carp, one to kill a normal carp
icon_state = "magspear"
/obj/item/projectile/bullet/magspear/on_hit(var/atom/target, var/blocked = 0)
if(!proj_hit)
proj_hit = 1
new /obj/item/ammo_casing/caseless/magspear(src.loc)
..()
/obj/item/projectile/bullet/magspear/on_range()
if(!proj_hit)
new /obj/item/ammo_casing/caseless/magspear(src.loc)
..()
@@ -126,9 +126,9 @@ datum/reagent/clf3/on_mob_life(var/mob/living/M as mob)
proc/goonchem_vortex(var/turf/simulated/T, var/setting_type, var/range, var/pull_times)
for(var/atom/movable/X in orange(range, T))
if(istype(X, /atom/movable))
if((X))
if((X) && !X.anchored)
if(setting_type)
for(var/i = 0, i < pull_times, i++)
step_towards(X,T)
step_away(X,T)
else
X.throw_at(T)
@@ -112,6 +112,11 @@ datum/reagent/medicine/adminordrazine/on_mob_life(var/mob/living/carbon/M as mob
..()
return
datum/reagent/medicine/adminordrazine/nanites
name = "Nanites"
id = "nanites"
description = "Tiny machines capable of rapid cellular regeneration."
datum/reagent/medicine/synaptizine
name = "Synaptizine"
id = "synaptizine"
@@ -57,7 +57,14 @@
reagents.add_reagent("ephedrine", 15)
reagents.add_reagent("salglu_solution", 15)
obj/item/weapon/reagent_containers/hypospray/combat/nanites
desc = "A modified air-needle autoinjector for use in combat situations. Prefilled with expensive medical nanites for rapid healing."
volume = 100
/obj/item/weapon/reagent_containers/hypospray/combat/nanites/New()
..()
reagents.remove_reagent("synaptizine", 30)
reagents.add_reagent("nanites", 100)
//MediPens
@@ -129,4 +136,4 @@
name = "morphine medipen"
desc = "A rapid way to get you out of a tight situation and fast! You'll feel rather drowsy, though."
icon_state = "medipen"
starting_reagent = "morphine"
starting_reagent = "morphine"
-1
View File
@@ -39,7 +39,6 @@ datum/design //Datum for object designs, used in construction
var/list/materials = list() //List of materials. Format: "id" = amount.
var/construction_time //Amount of time required for building the object
var/build_path = "" //The file path of the object that gets created
var/locked = 0 //If true it will spawn inside a lockbox with currently sec access
var/list/category = null //Primarily used for Mech Fabricators, but can be used for anything
@@ -369,3 +369,13 @@
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/aifixer
category = list("Computer Boards")
/datum/design/libraryconsole
name = "Computer Design (Library Console)"
desc = "Allows for the construction of circuit boards used to build a new library console."
id = "libraryconsole"
req_tech = list("programming" = 1)
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/libraryconsole
category = list("Computer Boards")
+23 -13
View File
@@ -2,6 +2,26 @@
/////////////////Weapons/////////////////
/////////////////////////////////////////
/datum/design/pin_testing
name = "test-range firing pin"
desc = "This safety firing pin allows firearms to be operated within proximity to a firing range."
id = "pin_testing"
req_tech = list("combat" = 1, "materials" = 2)
build_type = PROTOLATHE
materials = list("$metal" = 500, "$glass" = 300)
build_path = /obj/item/device/firing_pin/test_range
category = list("Firing Pins")
/datum/design/pin_loyalty
name = "loyalty firing pin"
desc = "This is a security firing pin which only authorizes users who are loyalty-implanted."
id = "pin_loyalty"
req_tech = list("combat" = 10, "materials" = 3, "powerstorage" = 3)
build_type = PROTOLATHE
materials = list("$silver" = 600, "$diamond" = 600, "$uranium" = 200)
build_path = /obj/item/device/firing_pin/implant/loyalty
category = list("Firing Pins")
/datum/design/nuclear_gun
name = "Advanced Energy Gun"
desc = "An energy gun with an experimental miniaturized reactor."
@@ -11,18 +31,16 @@
materials = list("$metal" = 5000, "$glass" = 1000, "$uranium" = 2000)
reliability = 76
build_path = /obj/item/weapon/gun/energy/gun/nuclear
locked = 1
category = list("Weapons")
/datum/design/stunrevolver
name = "Stun Revolver"
desc = "A high-tech revolver that fires internal, reusable stun cartidges in a revolving cylinder. The stun cartridges can be recharged using a conventional energy weapon recharger."
desc = "A high-tech revolver that fires internal, reusable stun cartridges in a revolving cylinder. The stun cartridges can be recharged using a conventional energy weapon recharger."
id = "stunrevolver"
req_tech = list("combat" = 3, "materials" = 3, "powerstorage" = 2)
build_type = PROTOLATHE
materials = list("$metal" = 4000)
build_path = /obj/item/weapon/gun/energy/stunrevolver
locked = 1
category = list("Weapons")
/datum/design/tele_shield
@@ -33,7 +51,6 @@
build_type = PROTOLATHE
materials = list("$metal" = 4000, "$glass" = 5000, "$silver" = 300)
build_path = /obj/item/weapon/shield/riot/tele
locked = 1
category = list("Weapons")
/datum/design/lasercannon
@@ -44,7 +61,6 @@
build_type = PROTOLATHE
materials = list("$metal" = 10000, "$glass" = 2000, "$diamond" = 2000)
build_path = /obj/item/weapon/gun/energy/lasercannon
locked = 1
category = list("Weapons")
/datum/design/decloner
@@ -55,7 +71,6 @@
build_type = PROTOLATHE
materials = list("$gold" = 5000,"$uranium" = 10000, "mutagen" = 40)
build_path = /obj/item/weapon/gun/energy/decloner
locked = 1
category = list("Weapons")
/datum/design/rapidsyringe
@@ -75,9 +90,9 @@
req_tech = list("combat" = 5, "materials" = 5, "engineering" = 3, "biotech" = 4, "syndicate" = 3)
build_type = PROTOLATHE
materials = list("$metal" = 5000, "$glass" = 1500, "$uranium" = 1500, "$silver" = 1500)
build_path = /obj/item/weapon/gun/projectile/automatic/crossbow/large
locked = 1
build_path = /obj/item/weapon/gun/energy/kinetic_accelerator/crossbow/large
category = list("Weapons")
reliability = 76
/datum/design/temp_gun
name = "Temperature Gun"
@@ -87,7 +102,6 @@
build_type = PROTOLATHE
materials = list("$metal" = 5000, "$glass" = 500, "$silver" = 3000)
build_path = /obj/item/weapon/gun/energy/temperature
locked = 1
category = list("Weapons")
/datum/design/flora_gun
@@ -119,7 +133,6 @@
build_type = PROTOLATHE
materials = list("$metal" = 8000, "$silver" = 2000, "$diamond" = 1000)
build_path = /obj/item/weapon/gun/projectile/automatic
locked = 1
category = list("Weapons")
/datum/design/xray
@@ -130,7 +143,6 @@
build_type = PROTOLATHE
materials = list("$gold" = 5000,"$uranium" = 10000, "$metal" = 4000)
build_path = /obj/item/weapon/gun/energy/xray
locked = 1
category = list("Weapons")
/datum/design/ionrifle
@@ -141,7 +153,6 @@
build_type = PROTOLATHE
materials = list("$silver" = 4000, "$metal" = 6000, "$uranium" = 1000)
build_path = /obj/item/weapon/gun/energy/ionrifle
locked = 1
category = list("Weapons")
/datum/design/wormhole_projector
@@ -152,7 +163,6 @@
build_type = PROTOLATHE
materials = list("$silver" = 1000, "$metal" = 5000, "$diamond" = 3000)
build_path = /obj/item/weapon/gun/energy/wormhole_projector
locked = 1
category = list("Weapons")
/datum/design/reciever
+199 -54
View File
@@ -21,12 +21,18 @@
density = 1
anchored = 1
use_power = 1
var/recentlyExperimented = 0
var/mob/trackedIan
var/mob/trackedRuntime
var/obj/item/loaded_item = null
///
var/badThingCoeff = 0
var/resetTime = 15
var/cloneMode = FALSE
var/cloneCount = 0
var/list/item_reactions = list()
var/list/valid_items = list()
var/list/valid_items = list() //valid items for special reactions like transforming
var/list/critical_items = list() //items that can cause critical reactions
/obj/machinery/r_n_d/experimentor/proc/ConvertReqString2List(var/list/source_list)
var/list/temp_list = params2list(source_list)
@@ -34,13 +40,49 @@
temp_list[O] = text2num(temp_list[O])
return temp_list
/obj/machinery/r_n_d/experimentor/proc/ConvertReqList2String(var/list/source_list)
var/returnString = ""
for(var/O in source_list)
returnString += "[O];"
return returnString
/* //uncomment to enable forced reactions.
/obj/machinery/r_n_d/experimentor/verb/forceReaction()
set name = "Force Experimentor Reaction"
set category = "Debug"
set src in oview(1)
var/reaction = input(usr,"What reaction?") in list(SCANTYPE_POKE,SCANTYPE_IRRADIATE,SCANTYPE_GAS,SCANTYPE_HEAT,SCANTYPE_COLD,SCANTYPE_OBLITERATE)
var/oldReaction = item_reactions["[loaded_item.type]"]
item_reactions["[loaded_item.type]"] = reaction
experiment(item_reactions["[loaded_item.type]"],loaded_item)
spawn(10)
if(loaded_item)
item_reactions["[loaded_item.type]"] = oldReaction
*/
/obj/machinery/r_n_d/experimentor/proc/SetTypeReactions()
var/probWeight = 0
for(var/I in typesof(/obj/item))
item_reactions["[I]"] = pick(SCANTYPE_POKE,SCANTYPE_IRRADIATE,SCANTYPE_GAS,SCANTYPE_HEAT,SCANTYPE_COLD,SCANTYPE_OBLITERATE)
if(ispath(I,/obj/item/weapon/reagent_containers/food) || ispath(I,/obj/item/weapon/stock_parts) || ispath(I,/obj/item/weapon/grenade/chem_grenade) || ispath(I,/obj/item/weapon/kitchen))
if(ispath(I,/obj/item/weapon/stock_parts) || ispath(I,/obj/item/weapon/grenade/chem_grenade) || ispath(I,/obj/item/weapon/kitchen))
var/obj/item/tempCheck = new I()
if(tempCheck.icon_state != null) //check it's an actual usable item, in a hacky way
valid_items += 15
valid_items += I
probWeight++
qdel(tempCheck)
if(ispath(I,/obj/item/weapon/reagent_containers/food))
var/obj/item/tempCheck = new I()
if(tempCheck.icon_state != null) //check it's an actual usable item, in a hacky way
valid_items += rand(1,max(2,35-probWeight))
valid_items += I
qdel(tempCheck)
if(ispath(I,/obj/item/weapon/rcd) || ispath(I,/obj/item/weapon/grenade) || ispath(I,/obj/item/device/aicard) || ispath(I,/obj/item/weapon/storage/backpack/holding) || ispath(I,/obj/item/slime_extract) || ispath(I,/obj/item/device/onetankbomb) || ispath(I,/obj/item/device/transfer_valve))
var/obj/item/tempCheck = new I()
if(tempCheck.icon_state != null)
critical_items += I
qdel(tempCheck)
@@ -53,6 +95,8 @@
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
trackedIan = locate(/mob/living/simple_animal/corgi/Ian) in mob_list
trackedRuntime = locate(/mob/living/simple_animal/cat/Runtime) in mob_list
SetTypeReactions()
RefreshParts()
@@ -65,35 +109,33 @@
for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts)
badThingCoeff += M.rating
/obj/machinery/r_n_d/experimentor/proc/checkCircumstances(var/obj/item/O as obj)
//snowflake check to only take "made" bombs
if(istype(O,/obj/item/device/transfer_valve))
var/obj/item/device/transfer_valve/T = O
if(!T.tank_one || !T.tank_two || !T.attached_device)
return FALSE
return TRUE
/obj/machinery/r_n_d/experimentor/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (shocked)
shock(user,50)
if (istype(O, /obj/item/weapon/screwdriver))
if (!panel_open)
panel_open = 1
if(linked_console)
linked_console.linked_destroy = null
linked_console = null
icon_state = "h_lathe_maint"
user << "<span class='notice'>You open the maintenance hatch of [src].</span>"
else
panel_open = 0
icon_state = "h_lathe"
user << "<span class='notice'>You close the maintenance hatch of [src].</span>"
if (default_deconstruction_screwdriver(user, "h_lathe_maint", "h_lathe", O))
if(linked_console)
linked_console.linked_destroy = null
linked_console = null
return
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)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
I.loc = src.loc
del(src)
return 1
else
user << "<span class='warning'>You can't load the [src.name] while it's opened.</span>"
return 1
if(exchange_parts(user, O))
return
default_deconstruction_crowbar(O)
if(!checkCircumstances(O))
user << "<span class='warning'>The [O] is not yet valid for the [src] and must be completed!</span>"
return
if (disabled)
return
if (!linked_console)
@@ -119,8 +161,7 @@
O.loc = src
user << "<span class='notice'>You add the [O.name] to the machine!</span>"
flick("h_lathe_load", src)
spawn(15)
icon_state = "h_lathe_wloop"
return
@@ -130,21 +171,25 @@
if(!linked_console)
dat += "<b><a href='byond://?src=\ref[src];function=search'>Scan for R&D Console</A></b><br>"
if(loaded_item)
dat += "<b>Loaded Item:</b> [loaded_item]<br>"
dat += "<b>Technology</b>:<br>"
var/list/D = ConvertReqString2List(loaded_item.origin_tech)
for(var/T in D)
dat += "[T]<br>"
dat += "<br><br>Available tests:"
dat += "<br><b><a href='byond://?src=\ref[src];item=\ref[loaded_item];function=[SCANTYPE_POKE]'>Poke</A></b>"
dat += "<br><b><a href='byond://?src=\ref[src];item=\ref[loaded_item];function=[SCANTYPE_IRRADIATE];'>Irradiate</A></b>"
dat += "<br><b><a href='byond://?src=\ref[src];item=\ref[loaded_item];function=[SCANTYPE_GAS]'>Gas</A></b>"
dat += "<br><b><a href='byond://?src=\ref[src];item=\ref[loaded_item];function=[SCANTYPE_HEAT]'>Burn</A></b>"
dat += "<br><b><a href='byond://?src=\ref[src];item=\ref[loaded_item];function=[SCANTYPE_COLD]'>Freeze</A></b>"
dat += "<br><b><a href='byond://?src=\ref[src];item=\ref[loaded_item];function=[SCANTYPE_OBLITERATE]'>Destroy</A></b><br>"
dat += "<br><b><a href='byond://?src=\ref[src];function=eject'>Eject</A>"
if(recentlyExperimented)
dat += "<b>The [src] is still resetting!</b>"
else
dat += "<b>Loaded Item:</b> [loaded_item]<br>"
dat += "<b>Technology</b>:<br>"
var/list/D = ConvertReqString2List(loaded_item.origin_tech)
for(var/T in D)
dat += "[T]<br>"
dat += "<br><br>Available tests:"
dat += "<br><b><a href='byond://?src=\ref[src];item=\ref[loaded_item];function=[SCANTYPE_POKE]'>Poke</A></b>"
dat += "<br><b><a href='byond://?src=\ref[src];item=\ref[loaded_item];function=[SCANTYPE_IRRADIATE];'>Irradiate</A></b>"
dat += "<br><b><a href='byond://?src=\ref[src];item=\ref[loaded_item];function=[SCANTYPE_GAS]'>Gas</A></b>"
dat += "<br><b><a href='byond://?src=\ref[src];item=\ref[loaded_item];function=[SCANTYPE_HEAT]'>Burn</A></b>"
dat += "<br><b><a href='byond://?src=\ref[src];item=\ref[loaded_item];function=[SCANTYPE_COLD]'>Freeze</A></b>"
dat += "<br><b><a href='byond://?src=\ref[src];item=\ref[loaded_item];function=[SCANTYPE_OBLITERATE]'>Destroy</A></b><br>"
dat += "<br><b><a href='byond://?src=\ref[src];function=eject'>Eject</A>"
else
dat += "<b>Nothing loaded.</b>"
dat += "<br><a href='byond://?src=\ref[src];function=refresh'>Refresh</A><br>"
dat += "<br><a href='byond://?src=\ref[src];function=close'>Close</A><br></center>"
var/datum/browser/popup = new(user, "experimentor","Experimentor", 700, 400, src)
popup.set_content(dat)
@@ -167,10 +212,35 @@
return FAIL
/obj/machinery/r_n_d/experimentor/proc/ejectItem(var/delete=FALSE)
loaded_item.loc = src.loc
if(delete)
qdel(loaded_item)
loaded_item = null
if(loaded_item)
if(cloneMode && cloneCount > 0)
visible_message("<span class='notice'>A duplicate [loaded_item] pops out!</span>")
new loaded_item(pick(oview(1,src)))
--cloneCount
if(cloneCount == 0)
cloneMode = FALSE
loaded_item.loc = pick(oview(1,src))
if(delete)
qdel(loaded_item)
loaded_item = null
/obj/machinery/r_n_d/experimentor/proc/throwSmoke(var/turf/where)
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new
smoke.set_up(1,0, where, 0)
smoke.start()
/obj/machinery/r_n_d/experimentor/proc/pickWeighted(var/list/from)
var/result = FALSE
var/counter = 1
while(!result)
var/probtocheck = from[counter]
if(prob(probtocheck))
result = TRUE
return from[counter+1]
if(counter + 2 < from.len)
counter = counter + 2
else
counter = 1
/*
#define EFFECT_PROB_VERYLOW 10
@@ -180,9 +250,15 @@
#define EFFECT_PROB_VERYHIGH 85
*/
/obj/machinery/r_n_d/experimentor/proc/experiment(var/exp,var/obj/item/exp_on)
recentlyExperimented = 1
icon_state = "h_lathe_wloop"
var/criticalReaction = locate(exp_on) in critical_items ? TRUE : FALSE
////////////////////////////////////////////////////////////////////////////////////////////////
if(exp == SCANTYPE_POKE)
visible_message("<span class='notice'>[src] prods at [exp_on] with mechanical arms.</span>")
if(prob(EFFECT_PROB_LOW) && criticalReaction)
visible_message("<span class='notice'>[exp_on] is gripped in just the right way, enhancing it's focus.</span>")
badThingCoeff++
if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
visible_message("<span class='notice'>[src] malfunctions and destroys [exp_on], lashing it's arms out at nearby people!.</span>")
for(var/mob/living/m in oview(1))
@@ -201,6 +277,11 @@
////////////////////////////////////////////////////////////////////////////////////////////////
if(exp == SCANTYPE_IRRADIATE)
visible_message("<span class='notice'>[src] reflects radioactive rays at [exp_on]!</span>")
if(prob(EFFECT_PROB_LOW) && criticalReaction)
visible_message("<span class='notice'>[exp_on] has activated an unknown subroutine!</span>")
cloneMode = TRUE
cloneCount = badThingCoeff
ejectItem()
if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
visible_message("<span class='notice'>[src] malfunctions, melting [exp_on] and leaking radiation!.</span>")
for(var/mob/living/m in oview(1))
@@ -213,10 +294,11 @@
if(prob(EFFECT_PROB_VERYHIGH))
new /obj/effect/decal/cleanable/greenglow(T)
else if(prob(EFFECT_PROB_MEDIUM-badThingCoeff))
visible_message("<span class='notice'>[src] malfunctions, transforming the [exp_on]!.</span>")
var/savedName = "[exp_on]"
ejectItem(TRUE)
var/newPath = pick(valid_items)
var/newPath = pickWeighted(valid_items)
loaded_item = new newPath(src)
visible_message("<span class='notice'>[src] malfunctions, transforming [savedName] into [loaded_item]!.</span>")
if(istype(loaded_item,/obj/item/weapon/grenade/chem_grenade))
var/obj/item/weapon/grenade/chem_grenade/CG = loaded_item
CG.prime()
@@ -224,6 +306,9 @@
////////////////////////////////////////////////////////////////////////////////////////////////
if(exp == SCANTYPE_GAS)
visible_message("<span class='notice'>[src] fills it's chamber with gas, [exp_on] included.</span>")
if(prob(EFFECT_PROB_LOW) && criticalReaction)
visible_message("<span class='notice'>[exp_on] achieves the perfect mix!</span>")
new /obj/item/stack/sheet/mineral/plasma(pick(oview(1,src)))
if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
visible_message("<span class='notice'>[src] destroys [exp_on], leaking dangerous gas!.</span>")
var/list/chems = list("carbon","radium","toxin","condensedcapsaicin","mushroomhallucinogen","space_drugs","ethanol","beepskysmash")
@@ -238,9 +323,7 @@
ejectItem(TRUE)
else if(prob(EFFECT_PROB_LOW-badThingCoeff))
visible_message("<span class='notice'>[src] malfunctions, spewing harmless gas!.</span>")
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new
smoke.set_up(1,0, src.loc, 0)
smoke.start()
throwSmoke(src.loc)
else if(prob(EFFECT_PROB_MEDIUM-badThingCoeff))
visible_message("<span class='notice'>[src] melts [exp_on], ionizing the air around it!.</span>")
empulse(src.loc, 8, 10)
@@ -248,6 +331,14 @@
////////////////////////////////////////////////////////////////////////////////////////////////
if(exp == SCANTYPE_HEAT)
visible_message("<span class='notice'>[src] raises [exp_on]'s temperature.</span>")
if(prob(EFFECT_PROB_LOW) && criticalReaction)
visible_message("<span class='notice'>[src]'s emergency coolant system gives off a small beep!</span>")
var/obj/item/weapon/reagent_containers/food/drinks/coffee/C = new /obj/item/weapon/reagent_containers/food/drinks/coffee(pick(oview(1,src)))
var/list/chems = list("plasma","capsaicin","ethanol")
C.reagents.remove_any(25)
C.reagents.add_reagent(pick(chems),25)
C.name = "Cup of Suspicious Liquid"
C.desc = "It has a large hazard symbol printed on the side in fading ink."
if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
visible_message("<span class='notice'>[src] malfunctions, melting [exp_on] and releasing a burst of flame!.</span>")
explosion(src.loc, -1, 0, 0, 0, 0, flame_range = 2)
@@ -267,15 +358,21 @@
ejectItem(TRUE)
else if(prob(EFFECT_PROB_MEDIUM-badThingCoeff))
visible_message("<span class='notice'>[src] malfunctions, activating it's emergency coolant systems!.</span>")
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new
smoke.set_up(1,0, src.loc, 0)
smoke.start()
throwSmoke(src.loc)
for(var/mob/living/m in oview(1))
m.apply_damage(5,"burn",pick("head","chest","groin"))
ejectItem()
////////////////////////////////////////////////////////////////////////////////////////////////
if(exp == SCANTYPE_COLD)
visible_message("<span class='notice'>[src] lowers [exp_on]'s temperature.</span>")
if(prob(EFFECT_PROB_LOW) && criticalReaction)
visible_message("<span class='notice'>[src]'s emergency coolant system gives off a small ping!</span>")
var/obj/machinery/vending/coffee/C = new /obj/machinery/vending/coffee(pick(oview(1,src)))
var/list/chems = list("uranium","frostoil","hyperzine")
C.reagents.remove_any(25)
C.reagents.add_reagent(pick(chems),25)
C.name = "Cup of Suspicious Liquid"
C.desc = "It has a large hazard symbol printed on the side in fading ink."
if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
visible_message("<span class='notice'>[src] malfunctions, shattering [exp_on] and releasing a dangerous cloud of coolant!</span>")
var/datum/reagents/R = new/datum/reagents(50)
@@ -309,6 +406,9 @@
////////////////////////////////////////////////////////////////////////////////////////////////
if(exp == SCANTYPE_OBLITERATE)
visible_message("<span class='notice'>[exp_on] activates the crushing mechanism, [exp_on] is destroyed!</span>")
if(prob(EFFECT_PROB_LOW) && criticalReaction)
visible_message("<span class='notice'>[src]'s crushing mechanism slowly and smoothly descends, flattening the [exp_on]!</span>")
new /obj/item/stack/sheet/plasteel(pick(oview(1,src)))
if(linked_console.linked_lathe)
linked_console.linked_lathe.m_amount += min((linked_console.linked_lathe.max_material_storage - linked_console.linked_lathe.TotalMaterials()), (exp_on.m_amt))
linked_console.linked_lathe.g_amount += min((linked_console.linked_lathe.max_material_storage - linked_console.linked_lathe.TotalMaterials()), (exp_on.g_amt))
@@ -342,9 +442,49 @@
var/b = pick("crushes","spins","viscerates","smashes","insults")
visible_message("<span class='notice'>[exp_on] [a], and [b], the experiment was a failiure!</span>")
//Global reactions
if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
var/globalMalf = rand(1,100)
if(globalMalf < 15)
visible_message("<span class='notice'>[src]'s onboard detection system has malfunctioned!.</span>")
item_reactions["[exp_on.type]"] = pick(SCANTYPE_POKE,SCANTYPE_IRRADIATE,SCANTYPE_GAS,SCANTYPE_HEAT,SCANTYPE_COLD,SCANTYPE_OBLITERATE)
ejectItem()
if(globalMalf > 16 && globalMalf < 35)
visible_message("<span class='notice'>[src] melts [exp_on], ian-izing the air around it!.</span>")
throwSmoke(src.loc)
if(trackedIan)
throwSmoke(trackedIan.loc)
trackedIan.loc = src.loc
else
new /mob/living/simple_animal/corgi(src.loc)
ejectItem(TRUE)
if(globalMalf > 36 && globalMalf < 50)
visible_message("<span class='notice'>[src] improves [exp_on], drawing the life essence of those nearby!</span>")
for(var/mob/living/m in view(4,src))
m << "<span class='danger'>You feel your flesh being torn from you, mists of blood drifting to [src]!</span>"
m.apply_damage(50,"brute","chest")
var/list/reqs = ConvertReqString2List(exp_on.origin_tech)
for(var/T in reqs)
T = T + 1
exp_on.origin_tech = ConvertReqList2String(reqs)
if(globalMalf > 51 && globalMalf < 75)
visible_message("<span class='notice'>[src] encounters a run-time error!</span>")
throwSmoke(src.loc)
if(trackedRuntime)
throwSmoke(trackedRuntime.loc)
trackedRuntime.loc = src.loc
else
new /mob/living/simple_animal/cat(src.loc)
ejectItem(TRUE)
if(globalMalf > 76)
visible_message("<span class='notice'>[src] begins to smoke and hiss, shaking violently!</span>")
use_power(500000)
spawn(resetTime)
icon_state = "h_lathe"
busy = 0
recentlyExperimented = 0
/obj/machinery/r_n_d/experimentor/Topic(href, href_list)
if(..())
@@ -362,7 +502,12 @@
linked_console = D
else if(scantype == "eject")
ejectItem()
else if(scantype == "refresh")
src.updateUsrDialog()
else
if(recentlyExperimented)
usr << "<span class='notice'>[src] has been used too recently!</span>"
return
var/dotype = matchReaction(process,scantype)
experiment(dotype,process)
use_power(750)
+12 -7
View File
@@ -399,7 +399,6 @@ won't update every console in existence) but it's more of a hassle to do. Also,
var/P = being_built.build_path //lets save these values before the spawn() just in case. Nobody likes runtimes.
var/R = being_built.reliability
var/O = being_built.locked
spawn(32*amount/coeff)
if(g2g) //And if we only fail the material requirements, we still spend time and power
for(var/i = 0, i<amount, i++)
@@ -411,12 +410,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
new_item.g_amt /= coeff
if(linked_lathe.hacked)
R = max((new_item.reliability/2), 0)
if(O)
var/obj/item/weapon/storage/lockbox/L = new/obj/item/weapon/storage/lockbox(linked_lathe.loc)
new_item.loc = L
L.name += " ([new_item.name])"
else
new_item.loc = linked_lathe.loc
new_item.loc = linked_lathe.loc
linked_lathe.busy = 0
screen = 3.15
updateUsrDialog()
@@ -988,7 +982,18 @@ won't update every console in existence) but it's more of a hassle to do. Also,
req_access = null
req_access_txt = "29"
/obj/machinery/computer/rdconsole/robotics/New()
..()
if(circuit)
circuit.name = "circuit board (RD Console - Robotics)"
circuit.build_path = /obj/machinery/computer/rdconsole/robotics
/obj/machinery/computer/rdconsole/core
name = "Core R&D Console"
desc = "A console used to interface with R&D tools."
id = 1
/obj/machinery/computer/rdconsole/experiment
name = "E.X.P.E.R.I-MENTOR R&D Console"
desc = "A console used to interface with R&D tools."
id = 1