mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 13:39:16 +01:00
+2
-1
@@ -1161,7 +1161,8 @@
|
||||
#include "code\modules\projectiles\guns\energy\stun.dm"
|
||||
#include "code\modules\projectiles\guns\energy\temperature.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\automatic.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\bow.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\crossbow.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\launcher.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\pistol.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\pneumatic.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\revolver.dm"
|
||||
|
||||
@@ -104,6 +104,8 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al
|
||||
for (var/language_name in all_languages)
|
||||
var/datum/language/L = all_languages[language_name]
|
||||
language_keys[":[lowertext(L.key)]"] = L
|
||||
language_keys[".[lowertext(L.key)]"] = L
|
||||
language_keys["#[lowertext(L.key)]"] = L
|
||||
|
||||
var/rkey = 0
|
||||
paths = typesof(/datum/species)-/datum/species
|
||||
@@ -128,4 +130,4 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al
|
||||
for(var/t in L)
|
||||
. += " has: [t]\n"
|
||||
world << .
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -232,6 +232,22 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
containername = "MULEbot Crate"
|
||||
group = "Operations"
|
||||
|
||||
/datum/supply_packs/cargotrain
|
||||
name = "Cargo Train Tug"
|
||||
contains = list(/obj/vehicle/train/cargo/engine)
|
||||
cost = 30
|
||||
containertype = /obj/structure/largecrate
|
||||
containername = "Cargo Train Tug Crate"
|
||||
group = "Operations"
|
||||
|
||||
/datum/supply_packs/cargotrailer
|
||||
name = "Cargo Train Trolley"
|
||||
contains = list(/obj/vehicle/train/cargo/trolley)
|
||||
cost = 20
|
||||
containertype = /obj/structure/largecrate
|
||||
containername = "Cargo Train Trolley Crate"
|
||||
group = "Operations"
|
||||
|
||||
/datum/supply_packs/lisa
|
||||
name = "Corgi Crate"
|
||||
contains = list()
|
||||
|
||||
@@ -85,7 +85,8 @@
|
||||
crewmemberData["fire"] = round(H.getFireLoss(), 1)
|
||||
crewmemberData["brute"] = round(H.getBruteLoss(), 1)
|
||||
crewmemberData["name"] = (H.wear_id ? H.wear_id.name : "Unknown")
|
||||
crewmemberData["area"] = get_area(H)
|
||||
var/area/A = get_area(H)
|
||||
crewmemberData["area"] = sanitize(A.name)
|
||||
crewmemberData["x"] = pos.x
|
||||
crewmemberData["y"] = pos.y
|
||||
|
||||
@@ -113,4 +114,4 @@
|
||||
var/obj/item/clothing/under/C = H.w_uniform
|
||||
if (C.has_sensor)
|
||||
tracked |= C
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -189,16 +189,19 @@
|
||||
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
|
||||
var/datum/money_account/CH = get_account(C.associated_account_number)
|
||||
if (CH) // Only proceed if card contains proper account number.
|
||||
if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
|
||||
if(vendor_account)
|
||||
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
|
||||
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
|
||||
transfer_and_vend(D)
|
||||
if(!CH.suspended)
|
||||
if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
|
||||
if(vendor_account)
|
||||
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
|
||||
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
|
||||
transfer_and_vend(D)
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
|
||||
//Just Vend it.
|
||||
transfer_and_vend(CH)
|
||||
else
|
||||
//Just Vend it.
|
||||
transfer_and_vend(CH)
|
||||
usr << "\icon[src]<span class='warning'>Connected account has been suspended.</span>"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Error: Unable to access your account. Please contact technical support if problem persists.</span>"
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ var/global/vox_tick = 1
|
||||
equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(src), slot_glasses) // REPLACE WITH CODED VOX ALTERNATIVE.
|
||||
equip_to_slot_or_del(new /obj/item/device/chameleon(src), slot_l_store)
|
||||
|
||||
var/obj/item/weapon/spikethrower/W = new(src)
|
||||
var/obj/item/weapon/gun/launcher/spikethrower/W = new(src)
|
||||
equip_to_slot_or_del(W, slot_r_hand)
|
||||
|
||||
|
||||
|
||||
@@ -175,9 +175,12 @@
|
||||
var/attempt_account_num = input("Enter account number to pay EFTPOS charges into", "New account number") as num
|
||||
var/attempt_pin = input("Enter pin code", "Account pin") as num
|
||||
linked_account = attempt_account_access(attempt_account_num, attempt_pin, 1)
|
||||
if(linked_account.suspended)
|
||||
linked_account = null
|
||||
usr << "\icon[src]<span class='warning'>Account has been suspended.</span>"
|
||||
if(linked_account)
|
||||
if(linked_account.suspended)
|
||||
linked_account = null
|
||||
usr << "\icon[src]<span class='warning'>Account has been suspended.</span>"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Account not found.</span>"
|
||||
if("trans_purpose")
|
||||
transaction_purpose = input("Enter reason for EFTPOS transaction", "Transaction purpose")
|
||||
if("trans_value")
|
||||
@@ -199,7 +202,7 @@
|
||||
else if(linked_account)
|
||||
transaction_locked = 1
|
||||
else
|
||||
usr << "\icon[src] <span class='warning'>No account connected to send transactions to.</span>"
|
||||
usr << "\icon[src]<span class='warning'>No account connected to send transactions to.</span>"
|
||||
if("scan_card")
|
||||
if(linked_account)
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
@@ -228,8 +231,12 @@
|
||||
if(transaction_locked && !transaction_paid)
|
||||
if(linked_account)
|
||||
if(!linked_account.suspended)
|
||||
var/attempt_pin = input("Enter pin code", "EFTPOS transaction") as num
|
||||
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
|
||||
var/attempt_pin = ""
|
||||
var/datum/money_account/D = get_account(C.associated_account_number)
|
||||
if(D.security_level)
|
||||
attempt_pin = input("Enter pin code", "EFTPOS transaction") as num
|
||||
D = null
|
||||
D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
|
||||
if(D)
|
||||
if(!D.suspended)
|
||||
if(transaction_amount <= D.money)
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
if(!client)
|
||||
return
|
||||
|
||||
if(speaker && !speaker.client && istype(src,/mob/dead/observer) && client.prefs.toggles & CHAT_GHOSTEARS && !speaker in view(src))
|
||||
//Does the speaker have a client? It's either random stuff that observers won't care about (Experiment 97B says, 'EHEHEHEHEHEHEHE')
|
||||
//Or someone snoring. So we make it where they won't hear it.
|
||||
return
|
||||
|
||||
if(sleeping || stat == 1)
|
||||
hear_sleep(message)
|
||||
return
|
||||
@@ -50,7 +55,7 @@
|
||||
src << "<span class='name'>[speaker_name]</span>[alt_name] talks but you cannot hear \him."
|
||||
else
|
||||
src << "<span class='game say'><span class='name'>[speaker_name]</span>[alt_name] [track][verb], <span class='message'><span class='[style]'>\"[message]\"</span></span></span>"
|
||||
if (speech_sound)
|
||||
if (speech_sound && (get_dist(speaker, src) <= world.view && src.z == speaker.z))
|
||||
var/turf/source = speaker? get_turf(speaker) : get_turf(src)
|
||||
src.playsound_local(source, speech_sound, sound_vol, 1)
|
||||
|
||||
|
||||
@@ -237,9 +237,7 @@
|
||||
|
||||
msg += "</span>"
|
||||
|
||||
if(stat == UNCONSCIOUS)
|
||||
msg += "[t_He] [t_is]n't responding to anything around [t_him] and seems to be asleep.\n"
|
||||
else if(getBrainLoss() >= 60)
|
||||
if(getBrainLoss() >= 60)
|
||||
msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n"
|
||||
|
||||
if(!key && brain_op_stage != 4 && stat != DEAD)
|
||||
|
||||
@@ -13,9 +13,11 @@
|
||||
|
||||
if(reagents.has_reagent("nuka_cola")) return -1
|
||||
|
||||
var/health_deficiency = (100 - health + halloss)
|
||||
var/health_deficiency = (100 - health)
|
||||
if(health_deficiency >= 40) tally += (health_deficiency / 25)
|
||||
|
||||
if(halloss >= 10) tally += (halloss / 10)
|
||||
|
||||
var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80
|
||||
if (hungry >= 70) tally += hungry/50
|
||||
|
||||
|
||||
@@ -1815,13 +1815,13 @@
|
||||
if("Ninja")
|
||||
holder.icon_state = "hudninja"
|
||||
if("head_loyalist")
|
||||
holder.icon_state = "loyalist"
|
||||
holder.icon_state = "hudloyalist"
|
||||
if("loyalist")
|
||||
holder.icon_state = "loyalist"
|
||||
holder.icon_state = "hudloyalist"
|
||||
if("head_mutineer")
|
||||
holder.icon_state = "mutineer"
|
||||
holder.icon_state = "hudmutineer"
|
||||
if("mutineer")
|
||||
holder.icon_state = "mutineer"
|
||||
holder.icon_state = "hudmutineer"
|
||||
|
||||
hud_list[SPECIALROLE_HUD] = holder
|
||||
hud_updateflag = 0
|
||||
|
||||
@@ -361,7 +361,7 @@ mob/living/simple_animal/borer/proc/detatch()
|
||||
host.verbs -= /mob/living/carbon/proc/spawn_larvae
|
||||
|
||||
|
||||
if(host_brain && host_brain.ckey)
|
||||
if(host_brain)
|
||||
|
||||
// host -> self
|
||||
var/h2s_id = host.computer_id
|
||||
|
||||
@@ -328,17 +328,25 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
|
||||
|
||||
/proc/shake_camera(mob/M, duration, strength=1)
|
||||
if(!M || !M.client || M.shakecamera)
|
||||
if(!M || !M.client || M.shakecamera)
|
||||
return
|
||||
M.shakecamera = 1
|
||||
spawn(1)
|
||||
var/oldeye=M.client.eye
|
||||
|
||||
var/atom/oldeye=M.client.eye
|
||||
var/aiEyeFlag = 0
|
||||
if(istype(oldeye, /mob/aiEye))
|
||||
aiEyeFlag = 1
|
||||
|
||||
var/x
|
||||
M.shakecamera = 1
|
||||
for(x=0; x<duration, x++)
|
||||
M.client.eye = locate(dd_range(1,M.loc.x+rand(-strength,strength),world.maxx),dd_range(1,M.loc.y+rand(-strength,strength),world.maxy),M.loc.z)
|
||||
if(aiEyeFlag)
|
||||
M.client.eye = locate(dd_range(1,oldeye.loc.x+rand(-strength,strength),world.maxx),dd_range(1,oldeye.loc.y+rand(-strength,strength),world.maxy),oldeye.loc.z)
|
||||
else
|
||||
M.client.eye = locate(dd_range(1,M.loc.x+rand(-strength,strength),world.maxx),dd_range(1,M.loc.y+rand(-strength,strength),world.maxy),M.loc.z)
|
||||
sleep(1)
|
||||
M.shakecamera = 0
|
||||
M.client.eye=oldeye
|
||||
M.shakecamera = 0
|
||||
|
||||
|
||||
/proc/findname(msg)
|
||||
|
||||
+16
-26
@@ -96,35 +96,25 @@
|
||||
|
||||
return 0
|
||||
|
||||
/mob/proc/say_quote(var/text,var/datum/language/speaking)
|
||||
/*
|
||||
***Deprecated***
|
||||
let this be handled at the hear_say or hear_radio proc
|
||||
This is left in for robot speaking when humans gain binary channel access until I get around to rewriting
|
||||
robot_talk() proc.
|
||||
There is no language handling build into it however there is at the /mob level so we accept the call
|
||||
for it but just ignore it.
|
||||
*/
|
||||
|
||||
if(!text)
|
||||
return "says, \"...\""; //not the best solution, but it will stop a large number of runtimes. The cause is somewhere in the Tcomms code
|
||||
//tcomms code is still runtiming somewhere here
|
||||
var/ending = copytext(text, length(text))
|
||||
/mob/proc/say_quote(var/message, var/datum/language/speaking = null)
|
||||
var/verb = "says"
|
||||
var/ending = copytext(message, length(message))
|
||||
if(ending=="!")
|
||||
verb=pick("exclaims","shouts","yells")
|
||||
else if(ending=="?")
|
||||
verb="asks"
|
||||
|
||||
var/speech_verb = "says"
|
||||
var/speech_style = "body"
|
||||
return verb
|
||||
|
||||
if (speaking)
|
||||
speech_verb = speaking.speech_verb
|
||||
speech_style = speaking.colour
|
||||
else if(speak_emote && speak_emote.len)
|
||||
speech_verb = pick(speak_emote)
|
||||
else if (src.stuttering)
|
||||
speech_verb = "stammers"
|
||||
else if (src.slurring)
|
||||
speech_verb = "slurrs"
|
||||
else if (ending == "?")
|
||||
speech_verb = "asks"
|
||||
else if (ending == "!")
|
||||
speech_verb = "exclaims"
|
||||
else if(isliving(src))
|
||||
var/mob/living/L = src
|
||||
if (L.getBrainLoss() >= 60)
|
||||
speech_verb = "gibbers"
|
||||
|
||||
return "<span class='say_quote'>[speech_verb],</span> \"<span class='[speech_style]'>[text]</span>\""
|
||||
|
||||
/mob/proc/emote(var/act, var/type, var/message)
|
||||
if(act == "me")
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
pressure_resistance = 10
|
||||
layer = OBJ_LAYER - 0.1
|
||||
var/amount = 30 //How much paper is in the bin.
|
||||
var/list/papers = new/list() //List of papers put in the bin for reference.
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
//Point blank shooting if on harm intent or target we were targeting.
|
||||
if(user.a_intent == "hurt")
|
||||
user.visible_message("\red <b> \The [user] fires \the [src] point blank at [M]!</b>")
|
||||
in_chamber.damage *= 1.3
|
||||
if(istype(in_chamber)) in_chamber.damage *= 1.3
|
||||
Fire(M,user)
|
||||
return
|
||||
else if(target && M in target)
|
||||
|
||||
@@ -1,19 +1,5 @@
|
||||
//Vox pinning weapon.
|
||||
|
||||
//Ammo.
|
||||
/obj/item/weapon/spike
|
||||
name = "alloy spike"
|
||||
desc = "It's about a foot of weird silver metal with a wicked point."
|
||||
sharp = 1
|
||||
edge = 0
|
||||
throwforce = 5
|
||||
w_class = 2
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "metal-rod"
|
||||
item_state = "bolt"
|
||||
|
||||
//Launcher.
|
||||
/obj/item/weapon/spikethrower
|
||||
/obj/item/weapon/gun/launcher/spikethrower
|
||||
|
||||
name = "Vox spike thrower"
|
||||
desc = "A vicious alien projectile weapon. Parts of it quiver gelatinously, as though the thing is insectile and alive."
|
||||
@@ -22,97 +8,60 @@
|
||||
var/spike_gen_time = 100
|
||||
var/max_spikes = 3
|
||||
var/spikes = 3
|
||||
var/obj/item/weapon/spike/spike
|
||||
var/fire_force = 30
|
||||
|
||||
//Going to make an effort to get this compatible with the threat targetting system.
|
||||
var/tmp/list/mob/living/target
|
||||
var/tmp/mob/living/last_moved_mob
|
||||
|
||||
release_force = 30
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "spikethrower3"
|
||||
item_state = "spikethrower"
|
||||
fire_sound_text = "a strange noise"
|
||||
fire_sound = 'sound/weapons/bladeslice.ogg'
|
||||
|
||||
/obj/item/weapon/spikethrower/New()
|
||||
/obj/item/weapon/gun/launcher/spikethrower/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
last_regen = world.time
|
||||
|
||||
/obj/item/weapon/spikethrower/Del()
|
||||
/obj/item/weapon/gun/launcher/spikethrower/Del()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/spikethrower/process()
|
||||
/obj/item/weapon/gun/launcher/spikethrower/process()
|
||||
|
||||
if(spikes < max_spikes && world.time > last_regen + spike_gen_time)
|
||||
spikes++
|
||||
last_regen = world.time
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/spikethrower/examine()
|
||||
/obj/item/weapon/gun/launcher/spikethrower/examine()
|
||||
..()
|
||||
usr << "It has [spikes] [spikes == 1 ? "spike" : "spikes"] remaining."
|
||||
|
||||
/obj/item/weapon/spikethrower/update_icon()
|
||||
/obj/item/weapon/gun/launcher/spikethrower/update_icon()
|
||||
icon_state = "spikethrower[spikes]"
|
||||
|
||||
/obj/item/weapon/spikethrower/afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
|
||||
if(flag) return
|
||||
if(user && user.client && user.client.gun_mode && !(A in target))
|
||||
//TODO: Make this compatible with targetting (prolly have to actually make it a gun subtype, ugh.)
|
||||
//PreFire(A,user,params)
|
||||
else
|
||||
Fire(A,user,params)
|
||||
|
||||
/obj/item/weapon/spikethrower/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
|
||||
|
||||
if (M == user && user.zone_sel.selecting == "mouth")
|
||||
M.visible_message("\red [user] attempts without success to fit [src] into their mouth.")
|
||||
return
|
||||
|
||||
if (spikes > 0)
|
||||
if(user.a_intent == "hurt")
|
||||
user.visible_message("\red <b> \The [user] fires \the [src] point blank at [M]!</b>")
|
||||
Fire(M,user)
|
||||
return
|
||||
else if(target && M in target)
|
||||
Fire(M,user)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/spikethrower/proc/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
var/turf/curloc = get_turf(user)
|
||||
var/turf/targloc = get_turf(target)
|
||||
if (!istype(targloc) || !istype(curloc))
|
||||
return
|
||||
/obj/item/weapon/gun/launcher/spikethrower/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/launcher/spikethrower/special_check(user)
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species && H.species.name != "Vox")
|
||||
user << "\red The weapon does not respond to you!"
|
||||
return
|
||||
else
|
||||
user << "\red The weapon does not respond to you!"
|
||||
return
|
||||
if(H.species && H.species.name != "Vox" && H.species.name != "Vox Armalis")
|
||||
user << "\red \The [src] does not respond to you!"
|
||||
return 0
|
||||
return 1
|
||||
|
||||
if(spikes <= 0)
|
||||
user << "\red The weapon has nothing to fire!"
|
||||
return
|
||||
/obj/item/weapon/gun/launcher/spikethrower/update_release_force()
|
||||
return
|
||||
|
||||
if(!spike)
|
||||
spike = new(src) //Create a spike.
|
||||
spike.add_fingerprint(user)
|
||||
spikes--
|
||||
/obj/item/weapon/gun/launcher/spikethrower/load_into_chamber()
|
||||
if(in_chamber) return 1
|
||||
if(spikes < 1) return 0
|
||||
|
||||
user.visible_message("\red [user] fires [src]!", "\red You fire [src]!")
|
||||
spike.loc = get_turf(src)
|
||||
spike.throw_at(target,10,fire_force,user)
|
||||
spike = null
|
||||
update_icon()
|
||||
spikes--
|
||||
in_chamber = new /obj/item/weapon/spike(src)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/launcher/spikethrower/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
|
||||
if(..()) update_icon()
|
||||
|
||||
//This gun only functions for armalis. The on-sprite is too huge to render properly on other sprites.
|
||||
/obj/item/weapon/gun/energy/noisecannon
|
||||
|
||||
+95
-117
@@ -1,3 +1,5 @@
|
||||
//AMMUNITION
|
||||
|
||||
/obj/item/weapon/arrow
|
||||
|
||||
name = "bolt"
|
||||
@@ -14,6 +16,17 @@
|
||||
/obj/item/weapon/arrow/proc/removed() //Helper for metal rods falling apart.
|
||||
return
|
||||
|
||||
/obj/item/weapon/spike
|
||||
name = "alloy spike"
|
||||
desc = "It's about a foot of weird silver metal with a wicked point."
|
||||
sharp = 1
|
||||
edge = 0
|
||||
throwforce = 5
|
||||
w_class = 2
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "metal-rod"
|
||||
item_state = "bolt"
|
||||
|
||||
/obj/item/weapon/arrow/quill
|
||||
|
||||
name = "vox quill"
|
||||
@@ -36,86 +49,50 @@
|
||||
S.loc = get_turf(src)
|
||||
src.Del()
|
||||
|
||||
/obj/item/weapon/crossbow
|
||||
/obj/item/weapon/gun/launcher/crossbow
|
||||
|
||||
name = "powered crossbow"
|
||||
desc = "A 2557AD twist on an old classic. Pick up that can."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "crossbow"
|
||||
item_state = "crossbow-solid"
|
||||
w_class = 5.0
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BELT | SLOT_BACK
|
||||
fire_sound = 'sound/weapons/punchmiss.ogg' // TODO: Decent THWOK noise.
|
||||
ejectshell = 0 // No spent shells.
|
||||
mouthshoot = 1 // No suiciding with this weapon, causes runtimes.
|
||||
fire_sound_text = "a solid thunk"
|
||||
fire_delay = 25
|
||||
|
||||
w_class = 3.0
|
||||
var/tension = 0 // Current draw on the bow.
|
||||
var/max_tension = 5 // Highest possible tension.
|
||||
var/release_speed = 5 // Speed per unit of tension.
|
||||
var/obj/item/weapon/cell/cell = null // Used for firing superheated rods.
|
||||
var/current_user // Used to check if the crossbow has changed hands since being drawn.
|
||||
|
||||
var/tension = 0 // Current draw on the bow.
|
||||
var/max_tension = 5 // Highest possible tension.
|
||||
var/release_speed = 5 // Speed per unit of tension.
|
||||
var/mob/living/current_user = null // Used to see if the person drawing the bow started drawing it.
|
||||
var/obj/item/weapon/arrow = null // Nocked arrow.
|
||||
var/obj/item/weapon/cell/cell = null // Used for firing special projectiles like rods.
|
||||
/obj/item/weapon/gun/launcher/crossbow/emp_act(severity)
|
||||
if(cell && severity)
|
||||
cell.use(100*severity)
|
||||
|
||||
/obj/item/weapon/crossbow/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(!arrow)
|
||||
if (istype(W,/obj/item/weapon/arrow))
|
||||
user.drop_item()
|
||||
arrow = W
|
||||
arrow.loc = src
|
||||
user.visible_message("[user] slides [arrow] into [src].","You slide [arrow] into [src].")
|
||||
icon_state = "crossbow-nocked"
|
||||
return
|
||||
else if(istype(W,/obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = W
|
||||
R.use(1)
|
||||
arrow = new /obj/item/weapon/arrow/rod(src)
|
||||
arrow.fingerprintslast = src.fingerprintslast
|
||||
arrow.loc = src
|
||||
icon_state = "crossbow-nocked"
|
||||
user.visible_message("[user] haphazardly jams [arrow] into [src].","You jam [arrow] into [src].")
|
||||
if(cell)
|
||||
if(cell.charge >= 500)
|
||||
user << "<span class='notice'>[arrow] plinks and crackles as it begins to glow red-hot.</span>"
|
||||
arrow.throwforce = 15
|
||||
arrow.icon_state = "metal-rod-superheated"
|
||||
cell.use(500)
|
||||
return
|
||||
/obj/item/weapon/gun/launcher/crossbow/special_check(user)
|
||||
if(tension <= 0)
|
||||
user << "\red \The [src] is not drawn back!"
|
||||
return 0
|
||||
return 1
|
||||
|
||||
if(istype(W, /obj/item/weapon/cell))
|
||||
if(!cell)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
cell = W
|
||||
user << "<span class='notice'>You jam [cell] into [src] and wire it to the firing coil.</span>"
|
||||
if(arrow)
|
||||
if(istype(arrow,/obj/item/weapon/arrow/rod) && arrow.throwforce < 15 && cell.charge >= 500)
|
||||
user << "<span class='notice'>[arrow] plinks and crackles as it begins to glow red-hot.</span>"
|
||||
arrow.throwforce = 15
|
||||
arrow.icon_state = "metal-rod-superheated"
|
||||
cell.use(500)
|
||||
else
|
||||
user << "<span class='notice'>[src] already has a cell installed.</span>"
|
||||
/obj/item/weapon/gun/launcher/crossbow/update_release_force()
|
||||
release_force = tension*release_speed
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(cell)
|
||||
var/obj/item/C = cell
|
||||
C.loc = get_turf(user)
|
||||
cell = null
|
||||
user << "<span class='notice'>You jimmy [cell] out of [src] with [W].</span>"
|
||||
else
|
||||
user << "<span class='notice'>[src] doesn't have a cell installed.</span>"
|
||||
/obj/item/weapon/gun/launcher/crossbow/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
|
||||
|
||||
else
|
||||
..()
|
||||
if(!..()) return //Only do this on a successful shot.
|
||||
icon_state = "crossbow"
|
||||
|
||||
/obj/item/weapon/crossbow/attack_self(mob/living/user as mob)
|
||||
/obj/item/weapon/gun/launcher/crossbow/attack_self(mob/living/user as mob)
|
||||
if(tension)
|
||||
if(arrow)
|
||||
user.visible_message("[user] relaxes the tension on [src]'s string and removes [arrow].","You relax the tension on [src]'s string and remove [arrow].")
|
||||
var/obj/item/weapon/arrow/A = arrow
|
||||
A.loc = get_turf(src)
|
||||
if(in_chamber && in_chamber.loc == src) //Just in case they click it the tick after firing.
|
||||
user.visible_message("[user] relaxes the tension on [src]'s string and removes [in_chamber].","You relax the tension on [src]'s string and remove [in_chamber].")
|
||||
in_chamber.loc = get_turf(src)
|
||||
var/obj/item/weapon/arrow/A = in_chamber
|
||||
in_chamber = null
|
||||
A.removed(user)
|
||||
arrow = null
|
||||
else
|
||||
user.visible_message("[user] relaxes the tension on [src]'s string.","You relax the tension on [src]'s string.")
|
||||
tension = 0
|
||||
@@ -123,9 +100,9 @@
|
||||
else
|
||||
draw(user)
|
||||
|
||||
/obj/item/weapon/crossbow/proc/draw(var/mob/user as mob)
|
||||
/obj/item/weapon/gun/launcher/crossbow/proc/draw(var/mob/user as mob)
|
||||
|
||||
if(!arrow)
|
||||
if(!in_chamber)
|
||||
user << "You don't have anything nocked to [src]."
|
||||
return
|
||||
|
||||
@@ -133,14 +110,13 @@
|
||||
return
|
||||
|
||||
current_user = user
|
||||
|
||||
user.visible_message("[user] begins to draw back the string of [src].","You begin to draw back the string of [src].")
|
||||
tension = 1
|
||||
spawn(25) increase_tension(user)
|
||||
spawn(25) increase_tension(user) //TODO: This needs to be changed to something less shit.
|
||||
|
||||
/obj/item/weapon/crossbow/proc/increase_tension(var/mob/user as mob)
|
||||
/obj/item/weapon/gun/launcher/crossbow/proc/increase_tension(var/mob/user as mob)
|
||||
|
||||
if(!arrow || !tension || current_user != user) //Arrow has been fired, bow has been relaxed or user has changed.
|
||||
if(!in_chamber || !tension || current_user != user) //Arrow has been fired, bow has been relaxed or user has changed.
|
||||
return
|
||||
|
||||
tension++
|
||||
@@ -153,60 +129,62 @@
|
||||
user.visible_message("[usr] draws back the string of [src]!","You continue drawing back the string of [src]!")
|
||||
spawn(25) increase_tension(user)
|
||||
|
||||
/obj/item/weapon/crossbow/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
|
||||
/obj/item/weapon/gun/launcher/crossbow/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(!in_chamber)
|
||||
if (istype(W,/obj/item/weapon/arrow))
|
||||
user.drop_item()
|
||||
in_chamber = W
|
||||
in_chamber.loc = src
|
||||
user.visible_message("[user] slides [in_chamber] into [src].","You slide [in_chamber] into [src].")
|
||||
icon_state = "crossbow-nocked"
|
||||
return
|
||||
else if(istype(W,/obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = W
|
||||
R.use(1)
|
||||
in_chamber = new /obj/item/weapon/arrow/rod(src)
|
||||
in_chamber.fingerprintslast = src.fingerprintslast
|
||||
in_chamber.loc = src
|
||||
icon_state = "crossbow-nocked"
|
||||
user.visible_message("[user] jams [in_chamber] into [src].","You jam [in_chamber] into [src].")
|
||||
superheat_rod(user)
|
||||
return
|
||||
|
||||
if (istype(target, /obj/item/weapon/storage/backpack ))
|
||||
src.dropped()
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/cell))
|
||||
if(!cell)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
cell = W
|
||||
user << "<span class='notice'>You jam [cell] into [src] and wire it to the firing coil.</span>"
|
||||
superheat_rod(user)
|
||||
else
|
||||
user << "<span class='notice'>[src] already has a cell installed.</span>"
|
||||
|
||||
else if (target.loc == user.loc)
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(cell)
|
||||
var/obj/item/C = cell
|
||||
C.loc = get_turf(user)
|
||||
user << "<span class='notice'>You jimmy [cell] out of [src] with [W].</span>"
|
||||
cell = null
|
||||
else
|
||||
user << "<span class='notice'>[src] doesn't have a cell installed.</span>"
|
||||
|
||||
else if (locate (/obj/structure/table, src.loc))
|
||||
return
|
||||
|
||||
else if(target == user)
|
||||
return
|
||||
|
||||
if(!tension)
|
||||
user << "You haven't drawn back the bolt!"
|
||||
return 0
|
||||
|
||||
if (!arrow)
|
||||
user << "You have no arrow nocked to [src]!"
|
||||
return 0
|
||||
else
|
||||
spawn(0) Fire(target,user,params)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/crossbow/proc/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
|
||||
/obj/item/weapon/gun/launcher/crossbow/proc/superheat_rod(var/mob/user)
|
||||
|
||||
add_fingerprint(user)
|
||||
if(!user || !cell || !in_chamber) return
|
||||
if(cell.charge < 500) return
|
||||
if(in_chamber.throwforce >= 15) return
|
||||
if(!istype(in_chamber,/obj/item/weapon/arrow/rod)) return
|
||||
|
||||
var/turf/curloc = get_turf(user)
|
||||
var/turf/targloc = get_turf(target)
|
||||
if (!istype(targloc) || !istype(curloc))
|
||||
return
|
||||
user << "<span class='notice'>[in_chamber] plinks and crackles as it begins to glow red-hot.</span>"
|
||||
in_chamber.throwforce = 15
|
||||
in_chamber.icon_state = "metal-rod-superheated"
|
||||
cell.use(500)
|
||||
|
||||
user.visible_message("<span class='danger'>[user] releases [src] and sends [arrow] streaking toward [target]!</span>","<span class='danger'>You release [src] and send [arrow] streaking toward [target]!</span>")
|
||||
|
||||
var/obj/item/weapon/arrow/A = arrow
|
||||
A.loc = get_turf(user)
|
||||
A.throw_at(target,10,tension*release_speed,user)
|
||||
arrow = null
|
||||
tension = 0
|
||||
icon_state = "crossbow"
|
||||
|
||||
/obj/item/weapon/crossbow/dropped(mob/user)
|
||||
if(arrow)
|
||||
var/obj/item/weapon/arrow/A = arrow
|
||||
A.loc = get_turf(src)
|
||||
A.removed(user)
|
||||
arrow = null
|
||||
tension = 0
|
||||
icon_state = "crossbow"
|
||||
|
||||
// Crossbow construction.
|
||||
|
||||
/obj/item/weapon/crossbowframe
|
||||
name = "crossbow frame"
|
||||
desc = "A half-finished crossbow."
|
||||
@@ -283,7 +261,7 @@
|
||||
else if(istype(W,/obj/item/weapon/screwdriver))
|
||||
if(buildstate == 5)
|
||||
user << "\blue You secure the crossbow's various parts."
|
||||
new /obj/item/weapon/crossbow(get_turf(src))
|
||||
new /obj/item/weapon/gun/launcher/crossbow(get_turf(src))
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
@@ -0,0 +1,91 @@
|
||||
/obj/item/weapon/gun/launcher
|
||||
|
||||
name = "launcher"
|
||||
desc = "A device that launches things."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
w_class = 5.0
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
|
||||
var/release_force = 0
|
||||
var/fire_sound_text = "a launcher firing"
|
||||
|
||||
//Check if we're drawing and if the bow is loaded.
|
||||
/obj/item/weapon/gun/launcher/load_into_chamber()
|
||||
return (!isnull(in_chamber))
|
||||
|
||||
//This should not fit in a combat belt or holster.
|
||||
/obj/item/weapon/gun/launcher/isHandgun()
|
||||
return 0
|
||||
|
||||
//Launchers are mechanical, no other impact.
|
||||
/obj/item/weapon/gun/launcher/emp_act(severity)
|
||||
return
|
||||
|
||||
//This normally uses a proc on projectiles and our ammo is not strictly speaking a projectile.
|
||||
/obj/item/weapon/gun/launcher/can_hit(var/mob/living/target as mob, var/mob/living/user as mob)
|
||||
return
|
||||
|
||||
//Override this to avoid a runtime with suicide handling.
|
||||
/obj/item/weapon/gun/launcher/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
|
||||
if (M == user && user.zone_sel.selecting == "mouth")
|
||||
user << "\red Shooting yourself with \a [src] is pretty tricky. You can't seem to manage it."
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/launcher/proc/update_release_force()
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/launcher/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
|
||||
|
||||
if (!user.IsAdvancedToolUser())
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return 0
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
//Make sure target turfs both exist.
|
||||
var/turf/curloc = get_turf(user)
|
||||
var/turf/targloc = get_turf(target)
|
||||
if (!istype(targloc) || !istype(curloc))
|
||||
return 0
|
||||
|
||||
if(!special_check(user))
|
||||
return 0
|
||||
|
||||
if (!ready_to_fire())
|
||||
if (world.time % 3) //to prevent spam
|
||||
user << "<span class='warning'>[src] is not ready to fire again!"
|
||||
return 0
|
||||
|
||||
if(!load_into_chamber()) //CHECK
|
||||
return click_empty(user)
|
||||
|
||||
if(!in_chamber)
|
||||
return 0
|
||||
|
||||
update_release_force()
|
||||
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
user.visible_message("<span class='warning'>[user] fires [src][reflex ? " by reflex":""]!</span>", \
|
||||
"<span class='warning'>You fire [src][reflex ? "by reflex":""]!</span>", \
|
||||
"You hear [fire_sound_text]!")
|
||||
|
||||
in_chamber.loc = get_turf(user)
|
||||
in_chamber.throw_at(target,10,release_force)
|
||||
|
||||
sleep(1)
|
||||
|
||||
in_chamber = null
|
||||
|
||||
update_icon()
|
||||
|
||||
if(user.hand)
|
||||
user.update_inv_l_hand()
|
||||
else
|
||||
user.update_inv_r_hand()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/launcher/attack_self(mob/living/user as mob)
|
||||
return
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/storage/pneumatic
|
||||
/obj/item/weapon/gun/launcher/pneumatic
|
||||
name = "pneumatic cannon"
|
||||
desc = "A large gas-powered cannon."
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
@@ -6,27 +6,28 @@
|
||||
item_state = "pneumatic"
|
||||
w_class = 5.0
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
max_w_class = 3
|
||||
max_combined_w_class = 20
|
||||
fire_sound_text = "a loud whoosh of moving air"
|
||||
fire_delay = 50
|
||||
fire_sound = 'sound/weapons/tablehit1.ogg'
|
||||
|
||||
var/fire_pressure // Used in fire checks/pressure checks.
|
||||
var/max_w_class = 3 // Hopper intake size.
|
||||
var/max_combined_w_class = 20 // Total internal storage size.
|
||||
var/obj/item/weapon/tank/tank = null // Tank of gas for use in firing the cannon.
|
||||
var/obj/item/weapon/storage/tank_container = new() // Something to hold the tank item so we don't accidentally fire it.
|
||||
var/pressure_setting = 10 // Percentage of the gas in the tank used to fire the projectile.
|
||||
var/possible_pressure_amounts = list(5,10,20,25,50) // Possible pressure settings.
|
||||
var/minimum_tank_pressure = 10 // Minimum pressure to fire the gun.
|
||||
var/cooldown = 0 // Whether or not we're cooling down.
|
||||
var/cooldown_time = 50 // Time between shots.
|
||||
var/force_divisor = 400 // Force equates to speed. Speed/5 equates to a damage multiplier for whoever you hit.
|
||||
// For reference, a fully pressurized oxy tank at 50% gas release firing a health
|
||||
// analyzer with a force_divisor of 10 hit with a damage multiplier of 3000+.
|
||||
/obj/item/weapon/storage/pneumatic/New()
|
||||
/obj/item/weapon/gun/launcher/pneumatic/New()
|
||||
..()
|
||||
tank_container.tag = "gas_tank_holder"
|
||||
|
||||
/obj/item/weapon/storage/pneumatic/verb/set_pressure() //set amount of tank pressure.
|
||||
/obj/item/weapon/gun/launcher/pneumatic/verb/set_pressure() //set amount of tank pressure.
|
||||
|
||||
set name = "Set valve pressure"
|
||||
set name = "Set Valve Pressure"
|
||||
set category = "Object"
|
||||
set src in range(0)
|
||||
var/N = input("Percentage of tank used per shot:","[src]") as null|anything in possible_pressure_amounts
|
||||
@@ -34,9 +35,9 @@
|
||||
pressure_setting = N
|
||||
usr << "You dial the pressure valve to [pressure_setting]%."
|
||||
|
||||
/obj/item/weapon/storage/pneumatic/verb/eject_tank() //Remove the tank.
|
||||
/obj/item/weapon/gun/launcher/pneumatic/verb/eject_tank() //Remove the tank.
|
||||
|
||||
set name = "Eject tank"
|
||||
set name = "Eject Tank"
|
||||
set category = "Object"
|
||||
set src in range(0)
|
||||
|
||||
@@ -50,7 +51,7 @@
|
||||
else
|
||||
usr << "There's no tank in [src]."
|
||||
|
||||
/obj/item/weapon/storage/pneumatic/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/item/weapon/gun/launcher/pneumatic/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(!tank && istype(W,/obj/item/weapon/tank))
|
||||
user.drop_item()
|
||||
tank = W
|
||||
@@ -59,10 +60,43 @@
|
||||
icon_state = "pneumatic-tank"
|
||||
item_state = "pneumatic-tank"
|
||||
user.update_icons()
|
||||
else
|
||||
..()
|
||||
else if(W.w_class <= max_w_class)
|
||||
|
||||
/obj/item/weapon/storage/pneumatic/examine()
|
||||
var/total_stored = 0
|
||||
for(var/obj/item/O in src.contents)
|
||||
total_stored += O.w_class
|
||||
if(total_stored + W.w_class <= max_combined_w_class)
|
||||
user.drop_item(W)
|
||||
W.loc = src
|
||||
user << "You shove [W] into the hopper."
|
||||
else
|
||||
user << "That won't fit into the hopper - it's full."
|
||||
return
|
||||
else
|
||||
user << "That won't fit into the hopper."
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/attack_self(mob/user as mob)
|
||||
|
||||
if(contents.len > 0)
|
||||
var/obj/item/removing = contents[contents.len]
|
||||
if(removing == in_chamber)
|
||||
in_chamber = null
|
||||
|
||||
removing.loc = get_turf(src)
|
||||
user.put_in_hands(removing)
|
||||
user << "You remove [removing] from the hopper."
|
||||
else
|
||||
user << "There is nothing to remove in \the [src]."
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/load_into_chamber()
|
||||
if(!contents.len)
|
||||
return 0
|
||||
|
||||
in_chamber = contents[1]
|
||||
return !isnull(in_chamber)
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/examine()
|
||||
set src in view()
|
||||
..()
|
||||
if (!(usr in view(2)) && usr!=src.loc) return
|
||||
@@ -72,76 +106,32 @@
|
||||
else
|
||||
usr << "Nothing is attached to the tank valve!"
|
||||
|
||||
/obj/item/weapon/storage/pneumatic/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
|
||||
if (istype(target, /obj/item/weapon/storage/backpack ))
|
||||
return
|
||||
|
||||
else if (target.loc == user.loc)
|
||||
return
|
||||
|
||||
else if (locate (/obj/structure/table, src.loc))
|
||||
return
|
||||
|
||||
else if(target == user)
|
||||
return
|
||||
|
||||
if (length(contents) == 0)
|
||||
user << "There's nothing in [src] to fire!"
|
||||
return 0
|
||||
else
|
||||
spawn(0) Fire(target,user,params)
|
||||
|
||||
/obj/item/weapon/storage/pneumatic/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
|
||||
if (length(contents) > 0)
|
||||
if(user.a_intent == "hurt")
|
||||
user.visible_message("\red <b> \The [user] fires \the [src] point blank at [M]!</b>")
|
||||
Fire(M,user)
|
||||
return
|
||||
else
|
||||
Fire(M,user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/pneumatic/proc/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
|
||||
/obj/item/weapon/gun/launcher/pneumatic/special_check(user)
|
||||
|
||||
if (!tank)
|
||||
user << "There is no gas tank in [src]!"
|
||||
return 0
|
||||
|
||||
if (cooldown)
|
||||
user << "The chamber hasn't built up enough pressure yet!"
|
||||
return 0
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
var/turf/curloc = get_turf(user)
|
||||
var/turf/targloc = get_turf(target)
|
||||
if (!istype(targloc) || !istype(curloc))
|
||||
return
|
||||
|
||||
var/fire_pressure = (tank.air_contents.return_pressure()/100)*pressure_setting
|
||||
|
||||
fire_pressure = (tank.air_contents.return_pressure()/100)*pressure_setting
|
||||
if (fire_pressure < minimum_tank_pressure)
|
||||
user << "There isn't enough gas in the tank to fire [src]."
|
||||
return 0
|
||||
|
||||
var/obj/item/object = contents[1]
|
||||
var/speed = ((fire_pressure*tank.volume)/object.w_class)/force_divisor //projectile speed.
|
||||
if(speed>80) speed = 80 //damage cap.
|
||||
return 1
|
||||
|
||||
user.visible_message("<span class='danger'>[user] fires [src] and launches [object] at [target]!</span>","<span class='danger'>You fire [src] and launch [object] at [target]!</span>")
|
||||
/obj/item/weapon/gun/launcher/pneumatic/update_release_force()
|
||||
if(!in_chamber) return
|
||||
release_force = ((fire_pressure*tank.volume)/in_chamber.w_class)/force_divisor //projectile speed.
|
||||
if(release_force >80) release_force = 80 //damage cap.
|
||||
|
||||
src.remove_from_storage(object,user.loc)
|
||||
object.throw_at(target,10,speed,user)
|
||||
/obj/item/weapon/gun/launcher/pneumatic/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
|
||||
|
||||
if(!tank || !..()) return //Only do this on a successful shot.
|
||||
|
||||
var/lost_gas_amount = tank.air_contents.total_moles*(pressure_setting/100)
|
||||
var/datum/gas_mixture/removed = tank.air_contents.remove(lost_gas_amount)
|
||||
user.loc.assume_air(removed)
|
||||
|
||||
cooldown = 1
|
||||
spawn(cooldown_time)
|
||||
cooldown = 0
|
||||
user << "[src]'s gauge informs you it's ready to be fired again."
|
||||
|
||||
//Constructable pneumatic cannon.
|
||||
|
||||
/obj/item/weapon/cannonframe
|
||||
@@ -215,7 +205,7 @@
|
||||
if(!src || !T.isOn()) return
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
|
||||
user << "\blue You weld the valve into place."
|
||||
new /obj/item/weapon/storage/pneumatic(get_turf(src))
|
||||
new /obj/item/weapon/gun/launcher/pneumatic(get_turf(src))
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 380, 650)
|
||||
ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 390, 655)
|
||||
// when the ui is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
reagents.add_reagent(refill, trans)
|
||||
user << "Cyborg [src] refilled."
|
||||
|
||||
return
|
||||
return ..()
|
||||
|
||||
/* examine()
|
||||
set src in view()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/obj/vehicle/train/cargo/engine
|
||||
name = "cargo train tug"
|
||||
desc = "A ridable electric car designed for pulling cargo trolleys."
|
||||
icon = 'icons/obj/aibots.dmi'
|
||||
icon_state = "mulebot1" //mulebot icons until I get some proper icons
|
||||
icon = 'icons/obj/vehicles.dmi'
|
||||
icon_state = "cargo_engine"
|
||||
on = 0
|
||||
powered = 1
|
||||
locked = 0
|
||||
@@ -10,7 +10,7 @@
|
||||
standing_mob = 1
|
||||
load_item_visible = 1
|
||||
load_offset_x = 0
|
||||
load_offset_y = 9
|
||||
load_offset_y = 8
|
||||
|
||||
var/car_limit = 3 //how many cars an engine can pull before performance degrades
|
||||
active_engines = 1
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
/obj/vehicle/train/cargo/trolley
|
||||
name = "cargo train trolley"
|
||||
icon = 'icons/obj/aibots.dmi'
|
||||
icon_state = "mulebot0"
|
||||
icon = 'icons/obj/vehicles.dmi'
|
||||
icon_state = "cargo_trailer"
|
||||
anchored = 0
|
||||
passenger_allowed = 0
|
||||
locked = 0
|
||||
@@ -34,7 +34,7 @@
|
||||
standing_mob = 1
|
||||
load_item_visible = 1
|
||||
load_offset_x = 0
|
||||
load_offset_y = 9
|
||||
load_offset_y = 5
|
||||
|
||||
//-------------------------------------------
|
||||
// Standard procs
|
||||
@@ -76,14 +76,10 @@
|
||||
|
||||
/obj/vehicle/train/cargo/update_icon()
|
||||
if(open)
|
||||
icon_state = "mulebot-hatch"
|
||||
icon_state = initial(icon_state) + "_open"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/vehicle/train/cargo/engine/Emag(mob/user as mob)
|
||||
..()
|
||||
flick("mulebot-emagged", src)
|
||||
|
||||
/obj/vehicle/train/cargo/trolley/insert_cell(var/obj/item/weapon/cell/C, var/mob/living/carbon/human/H)
|
||||
return
|
||||
|
||||
@@ -248,7 +244,10 @@
|
||||
if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !ismob(C))
|
||||
return 0
|
||||
|
||||
return ..()
|
||||
..()
|
||||
|
||||
if(istype(load, /mob/living/carbon/human))
|
||||
load.pixel_y += 4
|
||||
|
||||
/obj/vehicle/train/cargo/engine/load(var/atom/movable/C)
|
||||
if(!ismob(C))
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
return 1
|
||||
|
||||
/obj/vehicle/train/MouseDrop_T(var/atom/movable/C, mob/user as mob)
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !Adjacent(usr) || !user.Adjacent(C))
|
||||
if(user.buckled || user.stat || user.restrained() || !Adjacent(user) || !user.Adjacent(C))
|
||||
return
|
||||
if(istype(C,/obj/vehicle/train))
|
||||
latch(C, user)
|
||||
@@ -97,7 +97,7 @@
|
||||
contents -= user
|
||||
else if(load)
|
||||
unload(user) //unload if loaded
|
||||
else if(!load)
|
||||
else if(!load && !user.buckled)
|
||||
load(user) //else try climbing on board
|
||||
else
|
||||
return 0
|
||||
|
||||
@@ -157,6 +157,8 @@
|
||||
/obj/vehicle/attack_ai(mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/vehicle/proc/handle_rotation()
|
||||
return
|
||||
|
||||
//-------------------------------------------
|
||||
// Vehicle procs
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 38 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 10 KiB |
+1608
-1605
File diff suppressed because it is too large
Load Diff
@@ -42,7 +42,7 @@ Used In File(s): \code\game\objects\items\devices\PDA\PDA.dm
|
||||
ID:
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
{{:helper.link(data.idLink, 'eject', {'choice' : "Authenticate"}, data.idInserted ? null : 'disabled', data.idInserted ? 'fixedLeftWidest' : 'fixedLeft')}}
|
||||
{{:helper.link(data.idLink, 'eject', {'choice' : "Authenticate"}, data.idInserted ? null : 'disabled', data.idInserted ? 'floatright' : 'fixedLeft')}}
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
Reference in New Issue
Block a user