mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 23:17:02 +01:00
Merge remote-tracking branch 'refs/remotes/ParadiseSS13/master' into DatumEmotesMK2
This commit is contained in:
@@ -438,6 +438,14 @@ var/list/ghostteleportlocs = list()
|
||||
name = "Syndicate Infiltrator"
|
||||
icon_state = "shuttle"
|
||||
|
||||
/area/shuttle/trade
|
||||
name = "Trade Shuttle"
|
||||
icon_state = "shuttle"
|
||||
requires_power = 0
|
||||
|
||||
/area/shuttle/trade/sol
|
||||
name = "Sol Freighter"
|
||||
|
||||
/area/airtunnel1/ // referenced in airtunnel.dm:759
|
||||
|
||||
/area/dummy/ // Referenced in engine.dm:261
|
||||
@@ -675,6 +683,14 @@ var/list/ghostteleportlocs = list()
|
||||
icon_state = "southeast"
|
||||
requires_power = 0
|
||||
|
||||
/area/trader_station
|
||||
name = "Trade Base"
|
||||
icon_state = "yellow"
|
||||
requires_power = 0
|
||||
|
||||
/area/trader_station/sol
|
||||
name = "Jupiter Station 6"
|
||||
|
||||
/area/vox_station/mining
|
||||
name = "\improper Nearby Mining Asteroid"
|
||||
icon_state = "north"
|
||||
|
||||
@@ -331,4 +331,4 @@
|
||||
/atom/movable/CanPass(atom/movable/mover, turf/target, height=1.5)
|
||||
if(buckled_mob == mover)
|
||||
return 1
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
@@ -91,6 +91,8 @@
|
||||
loc.visible_message("<span class='warning'>The corpse of [H.name] suddenly rises!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobspore/death()
|
||||
..()
|
||||
|
||||
// On death, create a small smoke of harmful gas (s-Acid)
|
||||
var/datum/effect/system/chem_smoke_spread/S = new
|
||||
var/turf/location = get_turf(src)
|
||||
@@ -108,7 +110,6 @@
|
||||
S.set_up(reagents, 1, 1, location, 15, 1) // only 1-2 smoke cloud
|
||||
S.start()
|
||||
|
||||
ghostize()
|
||||
qdel(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobspore/Destroy()
|
||||
|
||||
@@ -14,9 +14,6 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
||||
required_enemies = 1
|
||||
recommended_enemies = 4
|
||||
|
||||
uplink_welcome = "Syndicate Uplink Console:"
|
||||
uplink_uses = 20
|
||||
|
||||
var/const/prob_int_murder_target = 50 // intercept names the assassination target half the time
|
||||
var/const/prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target
|
||||
var/const/prob_right_murder_target_h = 50 // upper bound on probability of naimg the right assassination target
|
||||
|
||||
@@ -73,6 +73,12 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/effect/proc_holder/changeling/proc/transfer_changeling_powers(var/mob/living/carbon/user, var/mob/living/carbon/target)
|
||||
if(istype(target, /mob/living/carbon)) // so we don't runtime, I don't even know why it's necessary as it needs a grab
|
||||
var/datum/changeling/c = user.mind.changeling
|
||||
var/datum/changeling/t = target.mind.changeling
|
||||
c.purchasedpowers = t.purchasedpowers
|
||||
|
||||
//used in /mob/Stat()
|
||||
/obj/effect/proc_holder/changeling/proc/can_be_used_by(var/mob/user)
|
||||
if(!ishuman(user))
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
user.key = ghost.key
|
||||
|
||||
user.Paralyse(2)
|
||||
user.remove_language("Changeling")
|
||||
target.add_language("Changeling")
|
||||
user.remove_language("Changeling")
|
||||
transfer_changeling_powers(user, target)
|
||||
|
||||
to_chat(target, "<span class='warning'>Our genes cry out as we swap our [user] form for [target].</span>")
|
||||
|
||||
@@ -34,9 +34,6 @@
|
||||
required_enemies = 3
|
||||
recommended_enemies = 4
|
||||
|
||||
uplink_welcome = "Nar-Sie Uplink Console:"
|
||||
uplink_uses = 20
|
||||
|
||||
var/datum/mind/sacrifice_target = null
|
||||
var/finished = 0
|
||||
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
config_tag = "extended"
|
||||
required_players = 0
|
||||
|
||||
uplink_welcome = "Syndicate Uplink Console:"
|
||||
uplink_uses = 20
|
||||
|
||||
/datum/game_mode/announce()
|
||||
to_chat(world, "<B>The current game mode is - Extended Role-Playing!</B>")
|
||||
to_chat(world, "<B>Just have fun and role-play!</B>")
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
var/newscaster_announcements = null
|
||||
var/ert_disabled = 0
|
||||
var/uplink_welcome = "Syndicate Uplink Console:"
|
||||
var/uplink_uses = 10
|
||||
var/uplink_uses = 20
|
||||
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
|
||||
|
||||
@@ -72,7 +72,7 @@ rcd light flash thingy on matter drain
|
||||
if(T.z in config.station_levels)
|
||||
// Increase health by 37.5% of original max, decrease delays between shots to 66%
|
||||
turret.health += initial(turret.health) * 3 / 8
|
||||
turret.eprojectile = /obj/item/projectile/beam/heavylaser //Once you see it, you will know what it means to FEAR.
|
||||
turret.eprojectile = /obj/item/projectile/beam/laser/heavylaser //Once you see it, you will know what it means to FEAR.
|
||||
turret.eshot_sound = 'sound/weapons/lasercannonfire.ogg'
|
||||
to_chat(src, "<span class='notice'>Turrets upgraded.</span>")
|
||||
/datum/AI_Module/large/destroy_rcd
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
required_enemies = 1
|
||||
recommended_enemies = 1
|
||||
|
||||
uplink_welcome = "Crazy AI Uplink Console:"
|
||||
uplink_uses = 10
|
||||
|
||||
var/AI_win_timeleft = 1500 //started at 1500, in case I change this for testing round end.
|
||||
var/malf_mode_declared = 0
|
||||
var/station_captured = 0
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
var/wave = 1
|
||||
required_players = 35
|
||||
|
||||
uplink_welcome = "EVIL METEOR Uplink Console:"
|
||||
uplink_uses = 10
|
||||
|
||||
|
||||
/datum/game_mode/meteor/announce()
|
||||
to_chat(world, "<B>The current game mode is - Meteor!</B>")
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
origin_tech = "materials=5;biotech=4;powerstorage=5;abductor=3"
|
||||
armor = list(melee = 15, bullet = 15, laser = 15, energy = 15, bomb = 15, bio = 15, rad = 15)
|
||||
action_button_name = "Activate"
|
||||
action_button_is_hands_free = 1
|
||||
action_button_custom_type = /datum/action/item_action/hands_free
|
||||
var/mode = VEST_STEALTH
|
||||
var/stealth_active = 0
|
||||
var/combat_cooldown = 10
|
||||
@@ -308,14 +308,7 @@
|
||||
icon_state = "alienpistol"
|
||||
item_state = "alienpistol"
|
||||
origin_tech = "combat=5;materials=4;powerstorage=3;abductor=3"
|
||||
|
||||
/obj/item/weapon/gun/energy/decloner/alien/special_check(user)
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.get_species() != "Abductor")
|
||||
to_chat(user, "<span class='userdanger'>UNAUTHORIZED -- UNAUTHORIZED</span>")
|
||||
return 0
|
||||
return 1
|
||||
restricted_species = list("Abductor")
|
||||
|
||||
/obj/item/weapon/paper/abductor
|
||||
name = "Dissection Guide"
|
||||
@@ -631,4 +624,4 @@ Congratulations! You are now trained for xenobiology research!"}
|
||||
icon_state = "abductor"
|
||||
icon_closed = "abductor"
|
||||
icon_opened = "abductoropen"
|
||||
material_drop = /obj/item/stack/sheet/mineral/abductor
|
||||
material_drop = /obj/item/stack/sheet/mineral/abductor
|
||||
|
||||
@@ -19,9 +19,6 @@ datum/game_mode/mutiny
|
||||
required_players = 20
|
||||
ert_disabled = 1
|
||||
|
||||
uplink_welcome = "Mutineers Uplink Console:"
|
||||
uplink_uses = 0
|
||||
|
||||
New()
|
||||
fluff = new(src)
|
||||
|
||||
|
||||
@@ -11,9 +11,6 @@ proc/issyndicate(mob/living/M as mob)
|
||||
required_enemies = 5
|
||||
recommended_enemies = 5
|
||||
|
||||
uplink_welcome = "Corporate Backed Uplink Console:"
|
||||
uplink_uses = 120
|
||||
|
||||
var/const/agents_possible = 5 //If we ever need more syndicate agents.
|
||||
|
||||
var/nukes_left = 1 // Call 3714-PRAY right now and order more nukes! Limited offer!
|
||||
|
||||
@@ -247,6 +247,7 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/objective/protect/mindslave //subytpe for mindslave implants
|
||||
|
||||
/datum/objective/hijack
|
||||
martyr_compatible = 0 //Technically you won't get both anyway.
|
||||
@@ -804,4 +805,50 @@ var/global/vox_kills = 0 //Used to check the Inviolate.
|
||||
explanation_text = "Follow the Inviolate. Minimise death and loss of resources."
|
||||
check_completion()
|
||||
if(vox_kills > MAX_VOX_KILLS) return 0
|
||||
return 1
|
||||
return 1
|
||||
|
||||
// Traders
|
||||
|
||||
/datum/objective/trade // Yes, I know there's no check_completion. The objectives exist only to tell the traders what to get.
|
||||
/datum/objective/trade/proc/choose_target(var/station)
|
||||
return
|
||||
|
||||
/datum/objective/trade/stock // Stock or spare parts.
|
||||
var/target_rating = 1
|
||||
/datum/objective/trade/stock/choose_target(var/station)
|
||||
var/itemname
|
||||
switch(rand(1,8))
|
||||
if(1)
|
||||
target = /obj/item/weapon/stock_parts/cell
|
||||
target_amount = 10
|
||||
target_rating = 3
|
||||
itemname = "ten high-capacity power cells"
|
||||
if(2)
|
||||
target = /obj/item/weapon/stock_parts/manipulator
|
||||
target_amount = 20
|
||||
itemname = "twenty micro manipulators"
|
||||
if(3)
|
||||
target = /obj/item/weapon/stock_parts/matter_bin
|
||||
target_amount = 20
|
||||
itemname = "twenty matter bins"
|
||||
if(4)
|
||||
target = /obj/item/weapon/stock_parts/micro_laser
|
||||
target_amount = 15
|
||||
itemname = "fifteen micro-lasers"
|
||||
if(5)
|
||||
target = /obj/item/weapon/stock_parts/capacitor
|
||||
target_amount = 15
|
||||
itemname = "fifteen capacitors"
|
||||
if(6)
|
||||
target = /obj/item/weapon/stock_parts/subspace/filter
|
||||
target_amount = 4
|
||||
itemname = "four hyperwave filters"
|
||||
if(7)
|
||||
target = /obj/item/solar_assembly
|
||||
target_amount = 10
|
||||
itemname = "ten solar panel assemblies"
|
||||
if(8)
|
||||
target = /obj/item/device/flash
|
||||
target_amount = 6
|
||||
itemname = "six flashes"
|
||||
explanation_text = "We are running low on spare parts. Trade for [itemname]."
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
/datum/theft_objective/hoslaser
|
||||
name = "the head of security's recreated antique laser gun"
|
||||
typepath = /obj/item/weapon/gun/energy/hos
|
||||
typepath = /obj/item/weapon/gun/energy/gun/hos
|
||||
protected_jobs = list("Head Of Security")
|
||||
|
||||
/datum/theft_objective/hand_tele
|
||||
@@ -244,4 +244,4 @@ datum/theft_objective/ai/check_special_completion(var/obj/item/device/aicard/C)
|
||||
typepath = /obj/item/stack/sheet/mineral/uranium
|
||||
min=10
|
||||
max=30
|
||||
step=5
|
||||
step=5
|
||||
|
||||
@@ -16,10 +16,6 @@
|
||||
required_enemies = 1
|
||||
recommended_enemies = 4
|
||||
|
||||
|
||||
uplink_welcome = "Syndicate Uplink Console:"
|
||||
uplink_uses = 20
|
||||
|
||||
var/traitors_possible = 4 //hard limit on traitors if scaling is turned off
|
||||
var/const/traitor_scaling_coeff = 5.0 //how much does the amount of players get divided by to determine traitors
|
||||
|
||||
@@ -370,10 +366,11 @@
|
||||
traitor_mind.special_role = null
|
||||
traitor_mind.som = null
|
||||
slaved.leave_serv_hud(traitor_mind)
|
||||
for(var/datum/objective/protect/mindslave/MS in traitor_mind.objectives)
|
||||
traitor_mind.objectives -= MS
|
||||
|
||||
update_traitor_icons_removed(traitor_mind)
|
||||
// to_chat(world, "Removed [traitor_mind.current.name] from traitor shit")
|
||||
to_chat(traitor_mind.current, "\red <FONT size = 3><B>The fog clouding your mind clears. You remember nothing from the moment you were implanted until now.(You don't remember who implanted you)</B></FONT>")
|
||||
to_chat(traitor_mind.current, "<span class='userdanger'>You are no longer a mindslave; you have complete and free control of your own faculties, once more!</span>")
|
||||
|
||||
/datum/game_mode/proc/assign_exchange_role(var/datum/mind/owner)
|
||||
//set faction
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
var/list/datum/mind/vampires = list()
|
||||
var/list/datum/mind/vampire_enthralled = list() //those controlled by a vampire
|
||||
var/list/vampire_thralls = list() //vammpires controlling somebody
|
||||
|
||||
/datum/game_mode/vampire
|
||||
name = "vampire"
|
||||
config_tag = "vampire"
|
||||
@@ -14,9 +15,6 @@
|
||||
required_enemies = 1
|
||||
recommended_enemies = 4
|
||||
|
||||
uplink_welcome = "Syndicate Uplink Console:"
|
||||
uplink_uses = 20
|
||||
|
||||
var/const/prob_int_murder_target = 50 // intercept names the assassination target half the time
|
||||
var/const/prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target
|
||||
var/const/prob_right_murder_target_h = 50 // upper bound on probability of naimg the right assassination target
|
||||
@@ -353,8 +351,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
|
||||
vampire_mind.som = null
|
||||
slaved.leave_serv_hud(vampire_mind)
|
||||
update_vampire_icons_removed(vampire_mind)
|
||||
// to_chat(world, "Removed [vampire_mind.current.name] from vampire shit")
|
||||
to_chat(vampire_mind.current, "\red <FONT size = 3><B>The fog clouding your mind clears. You remember nothing from the moment you were enthralled until now.</B></FONT>")
|
||||
vampire_mind.current.visible_message("<span class='userdanger'>[vampire_mind.current] looks as though a burden has been lifted!</span>", "<span class='userdanger'>The dark fog in your mind clears as you regain control of your own faculties, you are no longer a vampire thrall!</span>")
|
||||
if(vampire_mind.current.hud_used)
|
||||
vampire_mind.current.hud_used.remove_vampire_hud()
|
||||
|
||||
|
||||
@@ -267,6 +267,10 @@
|
||||
W.destroy()
|
||||
playsound(usr.loc, 'sound/effects/creepyshriek.ogg', 100, 1)
|
||||
|
||||
|
||||
/proc/isvampirethrall(mob/living/M as mob)
|
||||
return istype(M) && M.mind && ticker && ticker.mode && (M.mind in ticker.mode.vampire_enthralled)
|
||||
|
||||
/obj/effect/proc_holder/spell/vampire/targetted/enthrall
|
||||
name = "Enthrall (300)"
|
||||
desc = "You use a large portion of your power to sway those loyal to none to be loyal to you only."
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
if(!summon_type)
|
||||
switch (randomizeguns)
|
||||
if("taser")
|
||||
new /obj/item/weapon/gun/energy/advtaser(get_turf(H))
|
||||
new /obj/item/weapon/gun/energy/gun/advtaser(get_turf(H))
|
||||
if("egun")
|
||||
new /obj/item/weapon/gun/energy/gun(get_turf(H))
|
||||
if("laser")
|
||||
@@ -34,7 +34,7 @@
|
||||
if("gyrojet")
|
||||
new /obj/item/weapon/gun/projectile/automatic/gyropistol(get_turf(H))
|
||||
if("pulse")
|
||||
new /obj/item/weapon/gun/energy/pulse_rifle(get_turf(H))
|
||||
new /obj/item/weapon/gun/energy/pulse(get_turf(H))
|
||||
if("suppressed")
|
||||
new /obj/item/weapon/gun/projectile/automatic/pistol(get_turf(H))
|
||||
new /obj/item/weapon/suppressor(get_turf(H))
|
||||
@@ -71,7 +71,7 @@
|
||||
if("turret")
|
||||
new /obj/item/weapon/gun/energy/gun/turret(get_turf(H))
|
||||
if("pulsecarbine")
|
||||
new /obj/item/weapon/gun/energy/pulse_rifle/carbine(get_turf(H))
|
||||
new /obj/item/weapon/gun/energy/pulse/carbine(get_turf(H))
|
||||
if("decloner")
|
||||
new /obj/item/weapon/gun/energy/decloner(get_turf(H))
|
||||
if("mindflayer")
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
required_enemies = 1
|
||||
recommended_enemies = 1
|
||||
|
||||
uplink_welcome = "Wizardly Uplink Console:"
|
||||
uplink_uses = 20
|
||||
|
||||
var/use_huds = 0
|
||||
var/finished = 0
|
||||
var/but_wait_theres_more = 0
|
||||
|
||||
@@ -98,6 +98,10 @@
|
||||
/var/const/access_syndicate_leader = 151//Nuke Op Leader Access
|
||||
/var/const/access_vox = 152//Vox Access
|
||||
|
||||
//Trade Stations
|
||||
|
||||
var/const/access_trade_sol = 160
|
||||
|
||||
//MONEY
|
||||
/var/const/access_crate_cash = 200
|
||||
|
||||
@@ -267,6 +271,8 @@
|
||||
return list(access_mailsorting, access_mining, access_mining_station, access_mineral_storeroom, access_cargo, access_qm)
|
||||
if(REGION_COMMAND) //command
|
||||
return list(access_heads, access_RC_announce, access_keycard_auth, access_change_ids, access_ai_upload, access_teleporter, access_eva, access_tcomsat, access_gateway, access_all_personal_lockers, access_heads_vault, access_blueshield, access_ntrep, access_hop, access_captain)
|
||||
if(REGION_CENTCOMM) //because why the heck not
|
||||
return get_all_centcom_access() + get_all_accesses()
|
||||
|
||||
/proc/get_region_accesses_name(code)
|
||||
switch(code)
|
||||
@@ -286,6 +292,8 @@
|
||||
return "Supply"
|
||||
if(REGION_COMMAND) //command
|
||||
return "Command"
|
||||
if(REGION_CENTCOMM) //CC
|
||||
return "CentComm"
|
||||
|
||||
|
||||
/proc/get_access_desc(A)
|
||||
@@ -600,4 +608,3 @@ proc/get_all_job_icons() //For all existing HUD icons
|
||||
return
|
||||
|
||||
return "Unknown" //Return unknown if none of the above apply
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
H.equip_or_collect(new /obj/item/clothing/glasses/hud/security/sunglasses(H), slot_glasses)
|
||||
// H.equip_or_collect(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
|
||||
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
|
||||
H.equip_or_collect(new /obj/item/weapon/gun/energy/advtaser(H), slot_s_store)
|
||||
H.equip_or_collect(new /obj/item/weapon/gun/energy/gun/advtaser(H), slot_s_store)
|
||||
if(H.backbag == 1)
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
H.equip_or_collect(new /obj/item/weapon/restraints/handcuffs(H), slot_l_hand)
|
||||
@@ -175,7 +175,7 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/helmet(H), slot_head)
|
||||
H.equip_or_collect(new /obj/item/device/pda/security(H), slot_wear_pda)
|
||||
H.equip_or_collect(new /obj/item/clothing/gloves/color/black(H), slot_gloves)
|
||||
H.equip_or_collect(new /obj/item/weapon/gun/energy/advtaser(H), slot_s_store)
|
||||
H.equip_or_collect(new /obj/item/weapon/gun/energy/gun/advtaser(H), slot_s_store)
|
||||
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
|
||||
if(H.backbag == 1)
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
@@ -249,7 +249,7 @@
|
||||
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
|
||||
H.equip_or_collect(new /obj/item/device/pda/security(H), slot_wear_pda)
|
||||
H.equip_or_collect(new /obj/item/clothing/gloves/color/black(H), slot_gloves)
|
||||
H.equip_or_collect(new /obj/item/weapon/gun/energy/advtaser(H), slot_s_store)
|
||||
H.equip_or_collect(new /obj/item/weapon/gun/energy/gun/advtaser(H), slot_s_store)
|
||||
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
|
||||
if(H.backbag == 1)
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
|
||||
@@ -174,10 +174,10 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
||||
|
||||
if(H.backbag == 1)
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/deathimp(H), slot_r_hand)
|
||||
H.equip_or_collect(new /obj/item/weapon/gun/energy/blueshield(H), slot_l_hand)
|
||||
H.equip_or_collect(new /obj/item/weapon/gun/energy/gun/blueshield(H), slot_l_hand)
|
||||
else
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/box/deathimp(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/gun/energy/blueshield(H.back), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/gun/energy/gun/blueshield(H.back), slot_in_backpack)
|
||||
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
|
||||
L.imp_in = H
|
||||
L.implanted = 1
|
||||
@@ -263,4 +263,4 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
||||
L.imp_in = H
|
||||
L.implanted = 1
|
||||
H.sec_hud_set_implants()
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -244,6 +244,10 @@
|
||||
H.equip_or_collect(new /obj/item/toy/crayon/rainbow(H), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/storage/fancy/crayons(H), slot_in_backpack)
|
||||
H.equip_or_collect(new /obj/item/weapon/reagent_containers/spray/waterflower(H), slot_in_backpack)
|
||||
if(H.get_species() == "Machine")
|
||||
var/obj/item/organ/internal/cyberimp/brain/clown_voice/implant
|
||||
implant = new
|
||||
implant.insert(H)
|
||||
H.mutations.Add(CLUMSY)
|
||||
H.dna.SetSEState(COMICBLOCK,1,1)
|
||||
genemutcheck(H,COMICBLOCK,null,MUTCHK_FORCED)
|
||||
|
||||
@@ -184,7 +184,10 @@
|
||||
data["dialysis"] = connected.filtering
|
||||
if (connected.beaker)
|
||||
data["isBeakerLoaded"] = 1
|
||||
data["beakerFreeSpace"] = round(connected.beaker.reagents.maximum_volume - connected.beaker.reagents.total_volume)
|
||||
if(connected.beaker.reagents)
|
||||
data["beakerFreeSpace"] = round(connected.beaker.reagents.maximum_volume - connected.beaker.reagents.total_volume)
|
||||
else
|
||||
data["beakerFreeSpace"] = 0
|
||||
|
||||
var/chemicals[0]
|
||||
for (var/re in connected.injection_chems)
|
||||
|
||||
@@ -151,6 +151,9 @@
|
||||
qdel(src)
|
||||
return
|
||||
else if(istype(W, /obj/item/device/analyzer) && panel_open) //XRay
|
||||
if(!user.unEquip(W))
|
||||
to_chat(user, "<span class='warning'>[W] is stuck!</span>")
|
||||
return
|
||||
if(!isXRay())
|
||||
upgradeXRay()
|
||||
qdel(W)
|
||||
@@ -158,14 +161,19 @@
|
||||
else
|
||||
to_chat(user, "[msg2]")
|
||||
|
||||
else if(istype(W, /obj/item/stack/sheet/mineral/plasma) && panel_open)
|
||||
else if(istype(W, /obj/item/stack/sheet/mineral/plasma) && panel_open)
|
||||
if(!user.unEquip(W))
|
||||
to_chat(user, "<span class='warning'>[W] is stuck!</span>")
|
||||
return
|
||||
if(!isEmpProof())
|
||||
upgradeEmpProof()
|
||||
to_chat(user, "[msg]")
|
||||
qdel(W)
|
||||
else
|
||||
to_chat(user, "[msg2]")
|
||||
else if(istype(W, /obj/item/device/assembly/prox_sensor) && panel_open)
|
||||
else if(istype(W, /obj/item/device/assembly/prox_sensor) && panel_open)
|
||||
if(!user.unEquip(W))
|
||||
return
|
||||
if(!isMotion())
|
||||
upgradeMotion()
|
||||
to_chat(user, "[msg]")
|
||||
|
||||
@@ -20,10 +20,9 @@
|
||||
4 = Screwdriver panel closed and is fully built (you cannot attach upgrades)
|
||||
*/
|
||||
|
||||
/obj/item/weapon/camera_assembly/attackby(obj/item/W as obj, mob/living/user as mob, params)
|
||||
/obj/item/weapon/camera_assembly/attackby(obj/item/W, mob/living/user, params)
|
||||
|
||||
switch(state)
|
||||
|
||||
if(0)
|
||||
// State 0
|
||||
if(iswrench(W) && isturf(src.loc))
|
||||
@@ -116,7 +115,6 @@
|
||||
return
|
||||
|
||||
else if(iswirecutter(W))
|
||||
|
||||
new/obj/item/stack/cable_coil(get_turf(src), 2)
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
to_chat(user, "You cut the wires from the circuits.")
|
||||
@@ -125,9 +123,12 @@
|
||||
|
||||
// Upgrades!
|
||||
if(is_type_in_list(W, possible_upgrades) && !is_type_in_list(W, upgrades)) // Is a possible upgrade and isn't in the camera already.
|
||||
if(!user.unEquip(W))
|
||||
to_chat(user, "<span class='warning'>[W] is stuck!</span>")
|
||||
return
|
||||
to_chat(user, "You attach \the [W] into the assembly inner circuits.")
|
||||
upgrades += W
|
||||
user.drop_item(W)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
return
|
||||
|
||||
|
||||
@@ -273,6 +273,17 @@
|
||||
src.emagged = 0
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
if("AcceptDocking")
|
||||
to_chat(usr, "Docking request accepted!")
|
||||
trade_dock_timelimit = world.time + 1200
|
||||
trade_dockrequest_timelimit = 0
|
||||
command_announcement.Announce("Docking request for trading ship approved, please dock at port bay 4.", "Docking Request")
|
||||
if("DenyDocking")
|
||||
to_chat(usr, "Docking requeset denied!")
|
||||
trade_dock_timelimit = 0
|
||||
trade_dockrequest_timelimit = 0
|
||||
command_announcement.Announce("Docking request for trading ship denied.", "Docking request")
|
||||
|
||||
nanomanager.update_uis(src)
|
||||
return 1
|
||||
|
||||
@@ -358,6 +369,11 @@
|
||||
|
||||
data["shuttle"] = shuttle
|
||||
|
||||
if(trade_dockrequest_timelimit > world.time)
|
||||
data["dock_request"] = 1
|
||||
else
|
||||
data["dock_request"] = 0
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
if (!ui)
|
||||
|
||||
@@ -17,17 +17,20 @@
|
||||
var/data[0]
|
||||
var/list/pods[0]
|
||||
for(var/obj/item/device/spacepod_equipment/misc/tracker/TR in world)
|
||||
var/obj/spacepod/myPod = TR.my_atom
|
||||
var/obj/spacepod/my_pod = TR.my_atom
|
||||
var/enabled = TR.enabled
|
||||
if(myPod && enabled)
|
||||
var/podname = capitalize(sanitize(myPod.name))
|
||||
var/occupant = "None"
|
||||
var/occupant2 = "None"
|
||||
if(myPod.occupant)
|
||||
occupant = myPod.occupant.name
|
||||
if(myPod.occupant2)
|
||||
occupant2 = myPod.occupant2.name
|
||||
pods.Add(list(list("pod" = "\ref[myPod]", "name" = podname, "occupant" = occupant, "occupant2" = occupant2, "x" = myPod.x, "y" = myPod.y, "z" = myPod.z)))
|
||||
if(my_pod && enabled)
|
||||
var/podname = capitalize(sanitize(my_pod.name))
|
||||
var/list/chairs = list()
|
||||
if(my_pod.pilot || my_pod.passengers)
|
||||
if(my_pod.pilot)
|
||||
chairs += list("pilot" = my_pod.pilot.name)
|
||||
var/i = 1
|
||||
for(var/mob/M in my_pod.passengers)
|
||||
chairs += list("passenger [i]" = M.name)
|
||||
i++
|
||||
|
||||
pods.Add(list(list("pod" = "\ref[my_pod]", "name" = podname) + chairs + list("x" = my_pod.x, "y" = my_pod.y, "z" = my_pod.z)))
|
||||
|
||||
data["pods"] = pods
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
var/doorDeni = 'sound/machines/DeniedBeep.ogg' // i'm thinkin' Deni's
|
||||
var/boltUp = 'sound/machines/BoltsUp.ogg'
|
||||
var/boltDown = 'sound/machines/BoltsDown.ogg'
|
||||
var/is_special = 0
|
||||
|
||||
/obj/machinery/door/airlock/command
|
||||
name = "Airlock"
|
||||
@@ -126,6 +127,7 @@
|
||||
hackProof = 1
|
||||
aiControlDisabled = 1
|
||||
unacidable = 1
|
||||
is_special = 1
|
||||
|
||||
/obj/machinery/door/airlock/maintenance_hatch
|
||||
name = "Maintenance Hatch"
|
||||
@@ -304,6 +306,7 @@
|
||||
desc = "A mysterious alien airlock with a complicated opening mechanism."
|
||||
hackProof = 1
|
||||
icon = 'icons/obj/doors/Doorplasma.dmi'
|
||||
is_special = 1
|
||||
|
||||
/obj/machinery/door/airlock/alien/bumpopen(mob/living/user as mob)
|
||||
if(istype(user,/mob/living/carbon/alien) || isrobot(user) || isAI(user))
|
||||
@@ -799,7 +802,6 @@ About the new airlock wires panel:
|
||||
else
|
||||
return
|
||||
else if(istype(C, /obj/item/weapon/screwdriver))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 25, 1)
|
||||
src.p_open = !( src.p_open )
|
||||
src.update_icon()
|
||||
else if(istype(C, /obj/item/weapon/wirecutters))
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
name = "Virtual Gameboard"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "gboard_on"
|
||||
desc = "A holographic table allowing the crew to have fun™ on boring shifts! One player per board."
|
||||
desc = "A holographic table allowing the crew to have fun(TM) on boring shifts! One player per board."
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
var/cooling_down = 0
|
||||
light_color = LIGHT_COLOR_LIGHTBLUE
|
||||
|
||||
/obj/machinery/gameboard/New()
|
||||
..()
|
||||
@@ -20,6 +21,10 @@
|
||||
/obj/machinery/gameboard/power_change()
|
||||
. = ..()
|
||||
update_icon()
|
||||
if(stat & NOPOWER)
|
||||
set_light(0)
|
||||
else
|
||||
set_light(3, 3)
|
||||
|
||||
/obj/machinery/gameboard/update_icon()
|
||||
if(stat & NOPOWER)
|
||||
@@ -34,6 +39,9 @@
|
||||
if(src.in_use)
|
||||
to_chat(user, "This gameboard is already in use!")
|
||||
return
|
||||
if(!anchored)
|
||||
to_chat(user, "The gameboard is not secured!")
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/gameboard/interact(mob/user)
|
||||
@@ -68,10 +76,10 @@
|
||||
/obj/machinery/gameboard/Topic(var/href, var/list/href_list)
|
||||
. = ..()
|
||||
var/prize = /obj/item/stack/tickets
|
||||
if (.)
|
||||
if(.)
|
||||
return
|
||||
|
||||
if (href_list["checkmate"])
|
||||
if(href_list["checkmate"])
|
||||
if(cooling_down)
|
||||
message_admins("Too many checkmates on chessboard, possible HREF exploits: [key_name_admin(usr)] on [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
|
||||
return
|
||||
@@ -82,5 +90,11 @@
|
||||
spawn(600)
|
||||
cooling_down = 0
|
||||
|
||||
if (href_list["close"])
|
||||
if(href_list["close"])
|
||||
close_game()
|
||||
|
||||
/obj/machinery/gameboard/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob, params)
|
||||
if(istype(G, /obj/item/weapon/wrench))
|
||||
default_unfasten_wrench(user, G)
|
||||
else if(istype(G, /obj/item/weapon/crowbar))
|
||||
default_deconstruction_crowbar(G, ignore_panel = 1)
|
||||
|
||||
@@ -58,6 +58,9 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There is already ID card inside.</span>")
|
||||
|
||||
/obj/machinery/computer/guestpass/proc/get_changeable_accesses()
|
||||
return giver.access
|
||||
|
||||
/obj/machinery/computer/guestpass/attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
@@ -84,7 +87,7 @@
|
||||
dat += "Duration (minutes): <a href='?src=\ref[src];choice=duration'>[duration] m</a><br>"
|
||||
dat += "Access to areas:<br>"
|
||||
if (giver && giver.access)
|
||||
for (var/A in giver.access)
|
||||
for (var/A in get_changeable_accesses())
|
||||
var/area = get_access_desc(A)
|
||||
if (A in accesses)
|
||||
area = "<b>[area]</b>"
|
||||
@@ -124,7 +127,7 @@
|
||||
if (A in accesses)
|
||||
accesses.Remove(A)
|
||||
else
|
||||
if(giver && giver.access && (A in giver.access))
|
||||
if(giver && giver.access && (A in get_changeable_accesses()))
|
||||
accesses.Add(A)
|
||||
if (href_list["action"])
|
||||
switch(href_list["action"])
|
||||
@@ -179,4 +182,12 @@
|
||||
else
|
||||
to_chat(usr, "\red Cannot issue pass without issuing ID.")
|
||||
updateUsrDialog()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/computer/guestpass/hop
|
||||
name = "\improper HoP guest pass terminal"
|
||||
|
||||
/obj/machinery/computer/guestpass/hop/get_changeable_accesses()
|
||||
. = ..()
|
||||
if(. && access_change_ids in .)
|
||||
return get_all_accesses()
|
||||
|
||||
@@ -99,13 +99,12 @@
|
||||
one_access = 0
|
||||
|
||||
/obj/machinery/porta_turret/proc/setup()
|
||||
var/obj/item/weapon/gun/energy/E = installation //All energy-based weapons are applicable
|
||||
if(istext(installation)) E = text2path(installation)
|
||||
//var/obj/item/ammo_casing/shottype = E.projectile_type
|
||||
var/obj/item/weapon/gun/energy/E= new installation //All energy-based weapons are applicable
|
||||
var/obj/item/ammo_casing/shottype = E.ammo_type[1]
|
||||
|
||||
projectile = initial(E.projectile_type)
|
||||
projectile = shottype.projectile_type
|
||||
eprojectile = projectile
|
||||
shot_sound = initial(E.fire_sound)
|
||||
shot_sound = shottype.fire_sound
|
||||
eshot_sound = shot_sound
|
||||
|
||||
weapon_setup(installation)
|
||||
@@ -519,7 +518,7 @@ var/list/turret_icons
|
||||
assess_and_assign(ME.occupant, targets, secondarytargets)
|
||||
|
||||
for(var/obj/spacepod/SP in view(7,src))
|
||||
assess_and_assign(SP.occupant, targets, secondarytargets)
|
||||
assess_and_assign(SP.pilot, targets, secondarytargets)
|
||||
|
||||
for(var/obj/vehicle/T in view(7,src))
|
||||
assess_and_assign(T.buckled_mob, targets, secondarytargets)
|
||||
@@ -561,9 +560,6 @@ var/list/turret_icons
|
||||
if(get_dist(src, L) > 7) //if it's too far away, why bother?
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
if(!check_trajectory(L, src)) //check if we have true line of sight
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
if(emagged) // If emagged not even the dead get a rest
|
||||
return L.stat ? TURRET_SECONDARY_TARGET : TURRET_PRIORITY_TARGET
|
||||
|
||||
@@ -670,6 +666,8 @@ var/list/turret_icons
|
||||
return
|
||||
|
||||
/obj/machinery/porta_turret/proc/shootAt(var/mob/living/target)
|
||||
if(!raised) //the turret has to be raised in order to fire - makes sense, right?
|
||||
return
|
||||
//any emagged turrets will shoot extremely fast! This not only is deadly, but drains a lot power!
|
||||
if(!emagged) //if it hasn't been emagged, it has to obey a cooldown rate
|
||||
if(last_fired || !raised) //prevents rapid-fire shooting, unless it's been emagged
|
||||
@@ -684,10 +682,6 @@ var/list/turret_icons
|
||||
if(!istype(T) || !istype(U))
|
||||
return
|
||||
|
||||
if(!raised) //the turret has to be raised in order to fire - makes sense, right?
|
||||
return
|
||||
|
||||
|
||||
update_icon()
|
||||
var/obj/item/projectile/A
|
||||
if(emagged || lethal)
|
||||
@@ -698,18 +692,17 @@ var/list/turret_icons
|
||||
if(projectile)
|
||||
A = new projectile(loc)
|
||||
playsound(loc, shot_sound, 75, 1)
|
||||
A.original = target
|
||||
|
||||
// Lethal/emagged turrets use twice the power due to higher energy beams
|
||||
// Emagged turrets again use twice as much power due to higher firing rates
|
||||
use_power(reqpower * (2 * (emagged || lethal)) * (2 * emagged))
|
||||
|
||||
//Shooting Code:
|
||||
A.original = target
|
||||
A.current = T
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
spawn(1)
|
||||
A.process()
|
||||
A.fire()
|
||||
return A
|
||||
|
||||
/datum/turret_checks
|
||||
var/enabled
|
||||
|
||||
@@ -203,7 +203,8 @@
|
||||
if(istype(O,/obj/item/weapon/gun/energy/disabler/cyborg))
|
||||
var/obj/item/weapon/gun/energy/disabler/cyborg/D = O
|
||||
if(D.power_supply.charge < D.power_supply.maxcharge)
|
||||
D.power_supply.give(D.charge_cost)
|
||||
var/obj/item/ammo_casing/energy/E = D.ammo_type[D.select]
|
||||
D.power_supply.give(E.e_cost)
|
||||
D.update_icon()
|
||||
else
|
||||
D.charge_tick = 0
|
||||
|
||||
@@ -387,7 +387,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
src.receive_information(signal, src)
|
||||
|
||||
// Try sending it!
|
||||
var/list/try_send = list("/obj/machinery/telecomms/server", "/obj/machinery/telecomms/hub", "/obj/machinery/telecomms/broadcaster", "/obj/machinery/telecomms/bus")
|
||||
var/list/try_send = list("/obj/machinery/telecomms/server", "/obj/machinery/telecomms/hub", "/obj/machinery/telecomms/broadcaster")
|
||||
var/i = 0
|
||||
for(var/send in try_send)
|
||||
if(i)
|
||||
|
||||
@@ -436,6 +436,15 @@
|
||||
else
|
||||
icon_state = "tele0"
|
||||
|
||||
/obj/machinery/teleport/perma/attackby(obj/item/W, mob/user, params)
|
||||
if(default_deconstruction_screwdriver(user, "tele-o", "tele0", W))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(W)
|
||||
|
||||
/obj/machinery/teleport/station
|
||||
name = "station"
|
||||
desc = "The power control station for a bluespace teleporter."
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
turretTargets |= Mech
|
||||
else if( istype(O, /obj/spacepod) )
|
||||
var/obj/spacepod/Pod = O
|
||||
if( Pod.occupant || Pod.occupant2 )
|
||||
if( Pod.pilot )
|
||||
turretTargets |= Pod
|
||||
else if(istype(O,/mob/living/simple_animal))
|
||||
turretTargets |= O
|
||||
@@ -139,7 +139,7 @@
|
||||
return 1
|
||||
else if( istype(T, /obj/spacepod) )
|
||||
var/obj/spacepod/SP = T
|
||||
if( SP.occupant || SP.occupant2 )
|
||||
if( SP.pilot )
|
||||
return 1
|
||||
else if(istype(T,/mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/A = T
|
||||
@@ -159,8 +159,8 @@
|
||||
if(M.occupant)
|
||||
new_targets += M
|
||||
for(var/obj/spacepod/M in protected_area.turretTargets)
|
||||
if(M.occupant)
|
||||
new_targets += M
|
||||
if(M.pilot)
|
||||
new_targets += M.pilot
|
||||
for(var/mob/living/simple_animal/M in protected_area.turretTargets)
|
||||
if(!M.stat)
|
||||
new_targets += M
|
||||
@@ -227,15 +227,15 @@
|
||||
if(1)
|
||||
A = new /obj/item/projectile/beam(loc)
|
||||
if(2)
|
||||
A = new /obj/item/projectile/beam/heavylaser(loc)
|
||||
A = new /obj/item/projectile/beam/laser/heavylaser(loc)
|
||||
if(3)
|
||||
A = new /obj/item/projectile/beam/pulse(loc)
|
||||
if(4)
|
||||
A = new /obj/item/projectile/magic/change(loc)
|
||||
if(5)
|
||||
A = new /obj/item/projectile/lasertag/blue(loc)
|
||||
A = new /obj/item/projectile/beam/lasertag/bluetag(loc)
|
||||
if(6)
|
||||
A = new /obj/item/projectile/lasertag/red(loc)
|
||||
A = new /obj/item/projectile/beam/lasertag/redtag(loc)
|
||||
A.original = target
|
||||
use_power(500)
|
||||
else
|
||||
@@ -248,8 +248,7 @@
|
||||
A.current = T
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
spawn( 0 )
|
||||
A.process()
|
||||
A.fire()
|
||||
return
|
||||
|
||||
|
||||
@@ -488,7 +487,7 @@
|
||||
return 1
|
||||
else if(istype(target, /obj/spacepod))
|
||||
var/obj/spacepod/S = target
|
||||
if(S.occupant || S.occupant2)
|
||||
if(S.pilot)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -522,14 +521,12 @@
|
||||
continue //Don't shoot at empty mechs.
|
||||
pos_targets += M
|
||||
for(var/obj/spacepod/M in oview(scan_range, src))
|
||||
if(M.occupant)
|
||||
if(faction in M.occupant.faction)
|
||||
if(M.pilot)
|
||||
var/mob/P = M.pilot
|
||||
if(faction in P.faction)
|
||||
continue
|
||||
if(M.occupant2)
|
||||
if(faction in M.occupant2.faction)
|
||||
continue
|
||||
if(!M.occupant && !M.occupant2)
|
||||
continue //Don't shoot at empty mechs.
|
||||
if(!M.pilot)
|
||||
continue //Don't shoot at empty pods.
|
||||
pos_targets += M
|
||||
if(pos_targets.len)
|
||||
target = pick(pos_targets)
|
||||
|
||||
@@ -849,7 +849,7 @@
|
||||
product_ads = "Float like an astronaut, sting like a bullet!;Express your second amendment today!;Guns don't kill people, but you can!;Who needs responsibilities when you have guns?"
|
||||
vend_reply = "Remember the name: Liberation Station!"
|
||||
products = list(/obj/item/weapon/gun/projectile/automatic/pistol/deagle/gold = 2,/obj/item/weapon/gun/projectile/automatic/pistol/deagle/camo = 2,
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/m2411 = 2,/obj/item/weapon/gun/projectile/automatic/proto = 2,
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/m1911 = 2,/obj/item/weapon/gun/projectile/automatic/proto = 2,
|
||||
/obj/item/weapon/gun/projectile/shotgun/automatic/combat = 2,/obj/item/weapon/gun/projectile/automatic/gyropistol = 1,
|
||||
/obj/item/weapon/gun/projectile/shotgun = 2,/obj/item/weapon/gun/projectile/automatic/ar = 2)
|
||||
premium = list(/obj/item/ammo_box/magazine/smgm9mm = 2,/obj/item/ammo_box/magazine/m50 = 4,/obj/item/ammo_box/magazine/m45 = 2,/obj/item/ammo_box/magazine/m75 = 2)
|
||||
|
||||
@@ -384,7 +384,7 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun
|
||||
name = "Syringe Gun"
|
||||
desc = "Exosuit-mounted chem synthesizer with syringe gun. Reagents inside are held in stasis, so no reactions will occur. (Can be attached to: Medical Exosuits)"
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
icon_state = "syringegun"
|
||||
item_state = "syringegun"
|
||||
lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi'
|
||||
@@ -666,4 +666,4 @@
|
||||
for(var/reagent in S.processed_reagents)
|
||||
S.reagents.add_reagent(reagent,amount)
|
||||
S.chassis.use_power(energy_drain)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
var/projectile
|
||||
var/fire_sound
|
||||
var/size=0
|
||||
var/projectiles_per_shot = 1
|
||||
var/variance = 0
|
||||
var/randomspread = 0 //use random spread for machineguns, instead of shotgun scatter
|
||||
var/projectile_delay = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/can_attach(var/obj/mecha/combat/M as obj)
|
||||
if(..())
|
||||
@@ -16,32 +20,51 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/proc/get_shot_amount()
|
||||
return projectiles_per_shot
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy
|
||||
name = "General Energy Weapon"
|
||||
size = 2
|
||||
action(target)
|
||||
if(!action_checks(target)) return
|
||||
var/turf/curloc = chassis.loc
|
||||
var/atom/targloc = get_turf(target)
|
||||
if (!targloc || !istype(targloc, /turf) || !curloc)
|
||||
return
|
||||
if (targloc == curloc)
|
||||
return
|
||||
set_ready_state(0)
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/action(target, params)
|
||||
if(!action_checks(target))
|
||||
return 0
|
||||
|
||||
var/turf/curloc = get_turf(chassis)
|
||||
var/turf/targloc = get_turf(target)
|
||||
if (!targloc || !istype(targloc) || !curloc)
|
||||
return 0
|
||||
if (targloc == curloc)
|
||||
return 0
|
||||
|
||||
set_ready_state(0)
|
||||
for(var/i=1 to get_shot_amount())
|
||||
var/obj/item/projectile/A = new projectile(curloc)
|
||||
A.firer = chassis.occupant
|
||||
A.original = target
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
chassis.use_power(energy_drain)
|
||||
A.process()
|
||||
chassis.log_message("Fired from [src.name], targeting [target].")
|
||||
do_after_cooldown()
|
||||
return
|
||||
|
||||
var/spread = 0
|
||||
if(variance)
|
||||
if(randomspread)
|
||||
spread = round((rand() - 0.5) * variance)
|
||||
else
|
||||
spread = round((i / projectiles_per_shot - 0.5) * variance)
|
||||
A.preparePixelProjectile(target, targloc, chassis.occupant, params, spread)
|
||||
|
||||
chassis.use_power(energy_drain)
|
||||
A.fire()
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
|
||||
sleep(max(0, projectile_delay))
|
||||
set_ready_state(0)
|
||||
log_message("Fired from [name], targeting [target].")
|
||||
var/turf/T = get_turf(src)
|
||||
msg_admin_attack("[key_name_admin(chassis.occupant)] fired a [src] in ([T.x], [T.y], [T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)")
|
||||
log_game("[key_name(chassis.occupant)] fired a [src] in [T.x], [T.y], [T.z]")
|
||||
do_after_cooldown()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy
|
||||
name = "General Energy Weapon"
|
||||
size = 2
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
|
||||
equip_cooldown = 8
|
||||
@@ -56,7 +79,7 @@
|
||||
name = "CH-LC \"Solaris\" Laser Cannon"
|
||||
icon_state = "mecha_laser"
|
||||
energy_drain = 40
|
||||
projectile = /obj/item/projectile/beam/heavylaser
|
||||
projectile = /obj/item/projectile/beam/laser/heavylaser
|
||||
fire_sound = 'sound/weapons/lasercannonfire.ogg'
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/ion
|
||||
@@ -82,25 +105,25 @@
|
||||
icon_state = "pulse1_bl"
|
||||
var/life = 20
|
||||
|
||||
Bump(atom/A)
|
||||
A.bullet_act(src, def_zone)
|
||||
src.life -= 10
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
if(istype(firer, /mob))
|
||||
M.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
|
||||
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
|
||||
log_attack("<font color='red'>[firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src]</font>")
|
||||
if(!iscarbon(firer))
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.LAssailant = firer
|
||||
/obj/item/projectile/beam/pulse/heavy/Bump(atom/A)
|
||||
A.bullet_act(src, def_zone)
|
||||
life -= 10
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
if(istype(firer, /mob))
|
||||
M.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
|
||||
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
|
||||
log_attack("<font color='red'>[firer] ([firer.ckey]) shot [M] ([M.ckey]) with a [src]</font>")
|
||||
if(!iscarbon(firer))
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
|
||||
log_attack("<font color='red'>UNKNOWN shot [M] ([M.ckey]) with a [src]</font>")
|
||||
if(life <= 0)
|
||||
qdel(src)
|
||||
return
|
||||
M.LAssailant = firer
|
||||
else
|
||||
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>"
|
||||
log_attack("<font color='red'>UNKNOWN shot [M] ([M.ckey]) with a [src]</font>")
|
||||
if(life <= 0)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/taser
|
||||
@@ -119,89 +142,89 @@
|
||||
equip_cooldown = 150
|
||||
range = MELEE|RANGED
|
||||
|
||||
can_attach(obj/mecha/combat/honker/M as obj)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/honker/can_attach(obj/mecha/combat/honker/M as obj)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/honker/action(target, params)
|
||||
if(!chassis)
|
||||
return 0
|
||||
if(energy_drain && chassis.get_charge() < energy_drain)
|
||||
return 0
|
||||
if(!equip_ready)
|
||||
return 0
|
||||
|
||||
action(target)
|
||||
if(!chassis)
|
||||
return 0
|
||||
if(energy_drain && chassis.get_charge() < energy_drain)
|
||||
return 0
|
||||
if(!equip_ready)
|
||||
return 0
|
||||
playsound(chassis, 'sound/items/AirHorn.ogg', 100, 1)
|
||||
chassis.occupant_message("<font color='red' size='5'>HONK</font>")
|
||||
for(var/mob/living/carbon/M in ohearers(6, chassis))
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs))
|
||||
continue
|
||||
to_chat(M, "<font color='red' size='7'>HONK</font>")
|
||||
M.sleeping = 0
|
||||
M.stuttering = 20
|
||||
M.ear_deaf = 30
|
||||
M.Weaken(3)
|
||||
if(prob(30))
|
||||
M.Stun(10)
|
||||
M.Paralyse(4)
|
||||
else
|
||||
M.Jitter(500)
|
||||
///else the mousetraps are useless
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(isobj(H.shoes))
|
||||
var/thingy = H.shoes
|
||||
H.unEquip(H.shoes)
|
||||
walk_away(thingy,chassis,15,2)
|
||||
spawn(20)
|
||||
if(thingy)
|
||||
walk(thingy,0)
|
||||
for(var/obj/mecha/combat/recitence/R in oview(6, chassis))
|
||||
R.occupant_message("\The [R] has protected you from [chassis]'s HONK at the cost of some power.")
|
||||
R.use_power(R.get_charge() / 4)
|
||||
|
||||
playsound(chassis, 'sound/items/AirHorn.ogg', 100, 1)
|
||||
chassis.occupant_message("<font color='red' size='5'>HONK</font>")
|
||||
for(var/mob/living/carbon/M in ohearers(6, chassis))
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs))
|
||||
continue
|
||||
to_chat(M, "<font color='red' size='7'>HONK</font>")
|
||||
M.sleeping = 0
|
||||
M.stuttering = 20
|
||||
M.ear_deaf = 30
|
||||
M.Weaken(3)
|
||||
if(prob(30))
|
||||
M.Stun(10)
|
||||
M.Paralyse(4)
|
||||
else
|
||||
M.Jitter(500)
|
||||
///else the mousetraps are useless
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(isobj(H.shoes))
|
||||
var/thingy = H.shoes
|
||||
H.unEquip(H.shoes)
|
||||
walk_away(thingy,chassis,15,2)
|
||||
spawn(20)
|
||||
if(thingy)
|
||||
walk(thingy,0)
|
||||
for(var/obj/mecha/combat/recitence/R in oview(6, chassis))
|
||||
R.occupant_message("\The [R] has protected you from [chassis]'s HONK at the cost of some power.")
|
||||
R.use_power(R.get_charge() / 4)
|
||||
|
||||
chassis.use_power(energy_drain)
|
||||
log_message("Honked from [src.name]. HONK!")
|
||||
var/turf/T = get_turf(src)
|
||||
msg_admin_attack("[key_name_admin(chassis.occupant)] used a Mecha Honker in ([T.x], [T.y], [T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)")
|
||||
log_game("[key_name(chassis.occupant)] used a Mecha Honker in [T.x], [T.y], [T.z]")
|
||||
do_after_cooldown()
|
||||
return
|
||||
chassis.use_power(energy_drain)
|
||||
log_message("Honked from [name]. HONK!")
|
||||
var/turf/T = get_turf(src)
|
||||
msg_admin_attack("[key_name_admin(chassis.occupant)] used a Mecha Honker in ([T.x], [T.y], [T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)")
|
||||
log_game("[key_name(chassis.occupant)] used a Mecha Honker in [T.x], [T.y], [T.z]")
|
||||
do_after_cooldown()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic
|
||||
name = "General Ballisic Weapon"
|
||||
var/projectiles
|
||||
var/projectile_energy_cost
|
||||
size = 2
|
||||
action_checks(atom/target)
|
||||
if(..())
|
||||
if(projectiles > 0)
|
||||
return 1
|
||||
return 0
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/action_checks(atom/target)
|
||||
if(..())
|
||||
if(projectiles > 0)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
get_equip_info()
|
||||
return "[..()]\[[src.projectiles]\][(src.projectiles < initial(src.projectiles))?" - <a href='?src=\ref[src];rearm=1'>Rearm</a>":null]"
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/get_equip_info()
|
||||
return "[..()]\[[projectiles]\][(projectiles < initial(projectiles))?" - <a href='?src=\ref[src];rearm=1'>Rearm</a>":null]"
|
||||
|
||||
proc/rearm()
|
||||
if(projectiles < initial(projectiles))
|
||||
var/projectiles_to_add = initial(projectiles) - projectiles
|
||||
while(chassis.get_charge() >= projectile_energy_cost && projectiles_to_add)
|
||||
projectiles++
|
||||
projectiles_to_add--
|
||||
chassis.use_power(projectile_energy_cost)
|
||||
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info())
|
||||
log_message("Rearmed [src.name].")
|
||||
return
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/proc/rearm()
|
||||
if(projectiles < initial(projectiles))
|
||||
var/projectiles_to_add = initial(projectiles) - projectiles
|
||||
while(chassis.get_charge() >= projectile_energy_cost && projectiles_to_add)
|
||||
projectiles++
|
||||
projectiles_to_add--
|
||||
chassis.use_power(projectile_energy_cost)
|
||||
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",get_equip_info())
|
||||
log_message("Rearmed [name].")
|
||||
return
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if (href_list["rearm"])
|
||||
src.rearm()
|
||||
return
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/Topic(href, href_list)
|
||||
..()
|
||||
if (href_list["rearm"])
|
||||
rearm()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine
|
||||
name = "FNX-66 Carbine"
|
||||
@@ -211,41 +234,6 @@
|
||||
fire_sound = 'sound/weapons/Gunshot.ogg'
|
||||
projectiles = 24
|
||||
projectile_energy_cost = 15
|
||||
var/projectiles_per_shot = 1
|
||||
var/deviation = 0.0
|
||||
|
||||
action(atom/target)
|
||||
if(!action_checks(target)) return
|
||||
var/turf/targloc = get_turf(target)
|
||||
var/target_x = targloc.x
|
||||
var/target_y = targloc.y
|
||||
var/target_z = targloc.z
|
||||
targloc = null
|
||||
spawn for(var/i=1 to min(projectiles, projectiles_per_shot))
|
||||
if(!chassis) break
|
||||
var/turf/curloc = get_turf(chassis)
|
||||
targloc = locate(target_x+GaussRandRound(deviation,1),target_y+GaussRandRound(deviation,1),target_z)
|
||||
if (!targloc || !curloc)
|
||||
continue
|
||||
if (targloc == curloc)
|
||||
continue
|
||||
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
var/obj/item/projectile/A = new projectile(curloc)
|
||||
src.projectiles--
|
||||
A.original = target
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
A.process()
|
||||
sleep(2)
|
||||
set_ready_state(0)
|
||||
log_message("Fired from [src.name], targeting [target].")
|
||||
var/turf/T = get_turf(src)
|
||||
msg_admin_attack("[key_name_admin(chassis.occupant)] fired a [src] in ([T.x], [T.y], [T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)")
|
||||
log_game("[key_name(chassis.occupant)] fired a [src] in [T.x], [T.y], [T.z]")
|
||||
do_after_cooldown()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine/silenced
|
||||
name = "\improper S.H.H. \"Quietus\" Carbine"
|
||||
@@ -270,36 +258,8 @@
|
||||
fire_sound = 'sound/weapons/Gunshot.ogg'
|
||||
projectiles = 40
|
||||
projectile_energy_cost = 25
|
||||
var/projectiles_per_shot = 4
|
||||
var/deviation = 0.7
|
||||
|
||||
action(atom/target)
|
||||
if(!action_checks(target)) return
|
||||
var/turf/curloc = get_turf(chassis)
|
||||
var/turf/targloc = get_turf(target)
|
||||
if(!curloc || !targloc) return
|
||||
var/target_x = targloc.x
|
||||
var/target_y = targloc.y
|
||||
var/target_z = targloc.z
|
||||
targloc = null
|
||||
for(var/i=1 to min(projectiles, projectiles_per_shot))
|
||||
targloc = locate(target_x+GaussRandRound(deviation,1),target_y+GaussRandRound(deviation,1),target_z)
|
||||
if(!targloc || targloc == curloc)
|
||||
break
|
||||
playsound(chassis, fire_sound, 80, 1)
|
||||
var/obj/item/projectile/A = new projectile(curloc)
|
||||
src.projectiles--
|
||||
A.original = target
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
set_ready_state(0)
|
||||
A.process()
|
||||
log_message("Fired from [src.name], targeting [target].")
|
||||
do_after_cooldown()
|
||||
return
|
||||
|
||||
|
||||
projectiles_per_shot = 4
|
||||
variance = 25
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg
|
||||
name = "Ultra AC 2"
|
||||
@@ -309,38 +269,9 @@
|
||||
fire_sound = 'sound/weapons/Gunshot.ogg'
|
||||
projectiles = 300
|
||||
projectile_energy_cost = 20
|
||||
var/projectiles_per_shot = 3
|
||||
var/deviation = 0.3
|
||||
|
||||
action(atom/target)
|
||||
if(!action_checks(target)) return
|
||||
var/turf/targloc = get_turf(target)
|
||||
var/target_x = targloc.x
|
||||
var/target_y = targloc.y
|
||||
var/target_z = targloc.z
|
||||
targloc = null
|
||||
spawn for(var/i=1 to min(projectiles, projectiles_per_shot))
|
||||
if(!chassis) break
|
||||
var/turf/curloc = get_turf(chassis)
|
||||
targloc = locate(target_x+GaussRandRound(deviation,1),target_y+GaussRandRound(deviation,1),target_z)
|
||||
if (!targloc || !curloc)
|
||||
continue
|
||||
if (targloc == curloc)
|
||||
continue
|
||||
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
var/obj/item/projectile/A = new projectile(curloc)
|
||||
src.projectiles--
|
||||
A.original = target
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
A.process()
|
||||
sleep(2)
|
||||
set_ready_state(0)
|
||||
log_message("Fired from [src.name], targeting [target].")
|
||||
do_after_cooldown()
|
||||
return
|
||||
projectiles_per_shot = 3
|
||||
variance = 6
|
||||
projectile_delay = 2
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
|
||||
name = "SRM-8 Missile Rack"
|
||||
@@ -353,20 +284,21 @@
|
||||
var/missile_speed = 2
|
||||
var/missile_range = 30
|
||||
|
||||
action(target)
|
||||
if(!action_checks(target)) return
|
||||
set_ready_state(0)
|
||||
var/obj/item/missile/M = new projectile(chassis.loc)
|
||||
M.primed = 1
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
M.throw_at(target, missile_range, missile_speed, chassis)
|
||||
projectiles--
|
||||
log_message("Fired from [src.name], targeting [target].")
|
||||
var/turf/T = get_turf(src)
|
||||
msg_admin_attack("[key_name_admin(chassis.occupant)] fired a [src] in ([T.x], [T.y], [T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)")
|
||||
log_game("[key_name(chassis.occupant)] fired a [src] in [T.x], [T.y], [T.z]")
|
||||
do_after_cooldown()
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/action(target, params)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
set_ready_state(0)
|
||||
var/obj/item/missile/M = new projectile(chassis.loc)
|
||||
M.primed = 1
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
M.throw_at(target, missile_range, missile_speed, chassis)
|
||||
projectiles--
|
||||
log_message("Fired from [name], targeting [target].")
|
||||
var/turf/T = get_turf(src)
|
||||
msg_admin_attack("[key_name_admin(chassis.occupant)] fired a [src] in ([T.x], [T.y], [T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)")
|
||||
log_game("[key_name(chassis.occupant)] fired a [src] in [T.x], [T.y], [T.z]")
|
||||
do_after_cooldown()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/missile
|
||||
@@ -375,13 +307,13 @@
|
||||
var/primed = null
|
||||
throwforce = 15
|
||||
|
||||
throw_impact(atom/hit_atom)
|
||||
if(primed)
|
||||
explosion(hit_atom, 0, 0, 2, 4, 0)
|
||||
qdel(src)
|
||||
else
|
||||
..()
|
||||
return
|
||||
/obj/item/missile/throw_impact(atom/hit_atom)
|
||||
if(primed)
|
||||
explosion(hit_atom, 0, 0, 2, 4, 0)
|
||||
qdel(src)
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang
|
||||
name = "SGL-6 Grenade Launcher"
|
||||
@@ -394,18 +326,19 @@
|
||||
equip_cooldown = 60
|
||||
var/det_time = 20
|
||||
size=1
|
||||
action(target)
|
||||
if(!action_checks(target)) return
|
||||
set_ready_state(0)
|
||||
var/obj/item/weapon/grenade/flashbang/F = new projectile(chassis.loc)
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
F.throw_at(target, missile_range, missile_speed, chassis)
|
||||
projectiles--
|
||||
log_message("Fired from [src.name], targeting [target].")
|
||||
spawn(det_time)
|
||||
F.prime()
|
||||
do_after_cooldown()
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/action(target, params)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
set_ready_state(0)
|
||||
var/obj/item/weapon/grenade/flashbang/F = new projectile(chassis.loc)
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
F.throw_at(target, missile_range, missile_speed, chassis)
|
||||
projectiles--
|
||||
log_message("Fired from [name], targeting [target].")
|
||||
spawn(det_time)
|
||||
F.prime()
|
||||
do_after_cooldown()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang//Because I am a heartless bastard -Sieve
|
||||
name = "SOB-3 Grenade Launcher"
|
||||
@@ -417,7 +350,7 @@
|
||||
size=1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang/limited/get_equip_info()//Limited version of the clusterbang launcher that can't reload
|
||||
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> [chassis.selected==src?"<b>":"<a href='?src=\ref[chassis];select_equip=\ref[src]'>"][src.name][chassis.selected==src?"</b>":"</a>"]\[[src.projectiles]\]"
|
||||
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> [chassis.selected==src?"<b>":"<a href='?src=\ref[chassis];select_equip=\ref[src]'>"][name][chassis.selected==src?"</b>":"</a>"]\[[projectiles]\]"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang/limited/rearm()
|
||||
return//Extra bit of security
|
||||
@@ -432,22 +365,23 @@
|
||||
projectile_energy_cost = 100
|
||||
equip_cooldown = 20
|
||||
|
||||
can_attach(obj/mecha/combat/honker/M as obj)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar/can_attach(obj/mecha/combat/honker/M as obj)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
action(target)
|
||||
if(!action_checks(target)) return
|
||||
set_ready_state(0)
|
||||
var/obj/item/weapon/bananapeel/B = new projectile(chassis.loc)
|
||||
playsound(chassis, fire_sound, 60, 1)
|
||||
B.throw_at(target, missile_range, missile_speed, chassis)
|
||||
projectiles--
|
||||
log_message("Bananed from [src.name], targeting [target]. HONK!")
|
||||
do_after_cooldown()
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar/action(target, params)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
set_ready_state(0)
|
||||
var/obj/item/weapon/bananapeel/B = new projectile(chassis.loc)
|
||||
playsound(chassis, fire_sound, 60, 1)
|
||||
B.throw_at(target, missile_range, missile_speed, chassis)
|
||||
projectiles--
|
||||
log_message("Bananed from [name], targeting [target]. HONK!")
|
||||
do_after_cooldown()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/mousetrap_mortar
|
||||
@@ -460,23 +394,24 @@
|
||||
projectile_energy_cost = 100
|
||||
equip_cooldown = 10
|
||||
|
||||
can_attach(obj/mecha/combat/honker/M as obj)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/mousetrap_mortar/can_attach(obj/mecha/combat/honker/M as obj)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
action(target)
|
||||
if(!action_checks(target)) return
|
||||
set_ready_state(0)
|
||||
var/obj/item/device/assembly/mousetrap/M = new projectile(chassis.loc)
|
||||
M.secured = 1
|
||||
playsound(chassis, fire_sound, 60, 1)
|
||||
M.throw_at(target, missile_range, missile_speed, chassis)
|
||||
projectiles--
|
||||
log_message("Launched a mouse-trap from [src.name], targeting [target]. HONK!")
|
||||
do_after_cooldown()
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/mousetrap_mortar/action(target, params)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
set_ready_state(0)
|
||||
var/obj/item/device/assembly/mousetrap/M = new projectile(chassis.loc)
|
||||
M.secured = 1
|
||||
playsound(chassis, fire_sound, 60, 1)
|
||||
M.throw_at(target, missile_range, missile_speed, chassis)
|
||||
projectiles--
|
||||
log_message("Launched a mouse-trap from [name], targeting [target]. HONK!")
|
||||
do_after_cooldown()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bolas
|
||||
name = "PCMK-6 Bolas Launcher"
|
||||
@@ -489,23 +424,24 @@
|
||||
projectile_energy_cost = 50
|
||||
equip_cooldown = 10
|
||||
|
||||
can_attach(obj/mecha/combat/gygax/M as obj)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bolas/can_attach(obj/mecha/combat/gygax/M as obj)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
action(target)
|
||||
if(!action_checks(target)) return
|
||||
set_ready_state(0)
|
||||
var/obj/item/weapon/legcuffs/bolas/M = new projectile(chassis.loc)
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
M.thrown_from = src
|
||||
M.throw_at(target, missile_range, missile_speed)
|
||||
projectiles--
|
||||
log_message("Fired from [src.name], targeting [target].")
|
||||
do_after_cooldown()
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bolas/action(target, params)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
set_ready_state(0)
|
||||
var/obj/item/weapon/legcuffs/bolas/M = new projectile(chassis.loc)
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
M.thrown_from = src
|
||||
M.throw_at(target, missile_range, missile_speed)
|
||||
projectiles--
|
||||
log_message("Fired from [name], targeting [target].")
|
||||
do_after_cooldown()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma
|
||||
equip_cooldown = 20
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
// return ..()
|
||||
*/
|
||||
|
||||
/obj/mecha/proc/click_action(atom/target,mob/user)
|
||||
/obj/mecha/proc/click_action(atom/target, mob/user, params)
|
||||
if(!src.occupant || src.occupant != user ) return
|
||||
if(user.stat || !user.canmove)
|
||||
return
|
||||
@@ -239,9 +239,9 @@
|
||||
return
|
||||
if(!target.Adjacent(src))
|
||||
if(selected && selected.is_ranged())
|
||||
selected.action(target)
|
||||
selected.action(target, params)
|
||||
else if(selected && selected.is_melee())
|
||||
selected.action(target)
|
||||
selected.action(target, params)
|
||||
else
|
||||
if(internal_damage&MECHA_INT_CONTROL_LOST)
|
||||
target = safepick(oview(1,src))
|
||||
@@ -1991,4 +1991,4 @@
|
||||
|
||||
|
||||
/obj/mecha/speech_bubble(var/bubble_state = "",var/bubble_loc = src, var/list/bubble_recipients = list())
|
||||
flick_overlay(image('icons/mob/talk.dmi', bubble_loc, bubble_state,MOB_LAYER+1), bubble_recipients, 30)
|
||||
flick_overlay(image('icons/mob/talk.dmi', bubble_loc, bubble_state,MOB_LAYER+1), bubble_recipients, 30)
|
||||
|
||||
@@ -118,3 +118,41 @@
|
||||
/obj/item/weapon/relic = 3,
|
||||
"" = 11
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/trade_sol_rare
|
||||
name = "trader rare item spawner"
|
||||
lootdoubles = 0
|
||||
color = "#00FFFF"
|
||||
|
||||
loot = list(
|
||||
/obj/item/weapon/card/emag_broken = 2,
|
||||
/obj/item/weapon/defibrillator/compact/loaded = 2,
|
||||
/obj/item/weapon/gun/energy/laser/retro = 2,
|
||||
/obj/item/weapon/rcd/combat = 1,
|
||||
/obj/item/weapon/rcd = 2,
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/trade_sol_common
|
||||
name = "trader common item spawner"
|
||||
lootdoubles = 0
|
||||
color = "#00FFFF"
|
||||
|
||||
loot = list(
|
||||
/obj/item/weapon/tank/anesthetic = 2,
|
||||
/obj/item/weapon/weldingtool/hugetank = 2,
|
||||
/obj/item/weapon/pickaxe/diamond = 1,
|
||||
/obj/item/device/spacepod_equipment/weaponry/mining_laser = 1,
|
||||
/obj/item/device/paicard = 2,
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol = 2,
|
||||
/obj/item/device/megaphone = 2,
|
||||
/obj/item/weapon/stock_parts/capacitor = 1,
|
||||
/obj/item/weapon/stock_parts/cell/high = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1,
|
||||
/obj/item/weapon/stock_parts/scanning_module = 1,
|
||||
/obj/item/weapon/spacecash/c200 = 1,
|
||||
/obj/item/weapon/airlock_electronics = 1,
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/super = 1,
|
||||
/obj/item/pizzabox = 3,
|
||||
)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
//If this is set, The item will make an action button on the player's HUD when picked up.
|
||||
var/action_button_name //It is also the text which gets displayed on the action button. If not set it defaults to 'Use [name]'. If it's not set, there'll be no button.
|
||||
var/action_button_is_hands_free = 0 //If 1, bypass the restrained, lying, and stunned checks action buttons normally test for
|
||||
var/action_button_custom_type = null
|
||||
var/datum/action/item_action/action = null
|
||||
|
||||
var/list/materials = list()
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
/obj/item/weapon/door_remote/afterattack(obj/machinery/door/airlock/D, mob/user)
|
||||
if(!istype(D))
|
||||
return
|
||||
if(D.is_special)
|
||||
to_chat(user, "<span class='danger'>[src] cannot access this kind of door!</span>")
|
||||
return
|
||||
if(!(D.arePowerSystemsOn()))
|
||||
to_chat(user, "<span class='danger'>[D] has no power!</span>")
|
||||
return
|
||||
@@ -99,6 +102,12 @@
|
||||
icon_state = "gangtool-white"
|
||||
region_access = REGION_GENERAL
|
||||
|
||||
/obj/item/weapon/door_remote/centcomm
|
||||
name = "centcomm door remote"
|
||||
desc = "High-ranking NT officials only."
|
||||
icon_state = "gangtool-blue"
|
||||
region_access = REGION_CENTCOMM
|
||||
|
||||
#undef WAND_OPEN
|
||||
#undef WAND_BOLT
|
||||
#undef WAND_EMERGENCY
|
||||
#undef WAND_EMERGENCY
|
||||
|
||||
@@ -27,35 +27,34 @@ effective or pretty fucking useless.
|
||||
origin_tech = "magnets=3;combat=3;syndicate=3"
|
||||
|
||||
var/times_used = 0 //Number of times it's been used.
|
||||
var/max_uses = 2
|
||||
var/max_uses = 5
|
||||
|
||||
|
||||
/obj/item/device/batterer/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
|
||||
if(!user) return
|
||||
/obj/item/device/batterer/examine(mob/user)
|
||||
..(user)
|
||||
if(times_used >= max_uses)
|
||||
to_chat(user, "\red The mind batterer has been burnt out!")
|
||||
to_chat(user, "<span class='notice'>[src] is out of charge.</span>")
|
||||
if(times_used < max_uses)
|
||||
to_chat(user, "<span class='notice'>[src] has [max_uses-times_used] charges left.</span>")
|
||||
|
||||
/obj/item/device/batterer/attack_self(mob/living/carbon/user, flag = 0, emp = 0)
|
||||
if(!user)
|
||||
return
|
||||
if(times_used >= max_uses)
|
||||
to_chat(user, "<span class='danger'>The mind batterer has been burnt out!</span>")
|
||||
return
|
||||
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used [src] to knock down people in the area.</font>")
|
||||
|
||||
for(var/mob/living/carbon/human/M in orange(10, user))
|
||||
spawn()
|
||||
if(prob(50))
|
||||
for(var/mob/living/carbon/human/M in oview(7, user))
|
||||
if(prob(50))
|
||||
M.Weaken(rand(4,7))
|
||||
add_logs(M, user, "stunned", src)
|
||||
to_chat(M, "<span class='danger'>You feel a tremendous, paralyzing wave flood your mind.</span>")
|
||||
else
|
||||
to_chat(M, "<span class='danger'>You feel a sudden, electric jolt travel through your head.</span>")
|
||||
|
||||
M.Weaken(rand(10,20))
|
||||
if(prob(25))
|
||||
M.Stun(rand(5,10))
|
||||
to_chat(M, "\red <b>You feel a tremendous, paralyzing wave flood your mind.</b>")
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.LAssailant = user
|
||||
else
|
||||
to_chat(M, "\red <b>You feel a sudden, electric jolt travel through your head.</b>")
|
||||
|
||||
playsound(src.loc, 'sound/misc/interference.ogg', 50, 1)
|
||||
to_chat(user, "\blue You trigger [src].")
|
||||
times_used += 1
|
||||
playsound(loc, 'sound/misc/interference.ogg', 50, 1)
|
||||
times_used++
|
||||
to_chat(user, "<span class='notice'>You trigger [src]. It has [max_uses-times_used] charges left.</span>")
|
||||
if(times_used >= max_uses)
|
||||
icon_state = "battererburnt"
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
var/mob/attacher = null
|
||||
var/valve_open = 0
|
||||
var/toggle = 1
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
|
||||
/obj/item/device/transfer_valve/proc/process_activation(var/obj/item/device/D)
|
||||
|
||||
@@ -187,7 +188,7 @@
|
||||
attacher_name = "[key_name_admin(attacher)]"
|
||||
|
||||
var/mob/mob = get_mob_by_key(src.fingerprintslast)
|
||||
|
||||
|
||||
bombers += "Bomb valve opened at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with [attached_device ? attached_device : "no device"], attached by [attacher_name]. Last touched by: [key_name(mob)]"
|
||||
message_admins("Bomb valve opened at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a> with [attached_device ? attached_device : "no device"], attached by [attacher_name]. Last touched by: [key_name_admin(mob)]")
|
||||
log_game("Bomb valve opened at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with [attached_device ? attached_device : "no device"], attached by [attacher_name]. Last touched by: [key_name(mob)]")
|
||||
|
||||
@@ -147,17 +147,14 @@ var/list/tape_roll_applications = list()
|
||||
tape_roll_applications[F] |= direction
|
||||
return
|
||||
|
||||
/obj/item/tape/Bumped(M as mob)
|
||||
if(src.allowed(M))
|
||||
var/turf/T = get_turf(src)
|
||||
M:loc = T
|
||||
|
||||
/obj/item/tape/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(!density) return 1
|
||||
if(air_group || (height==0)) return 1
|
||||
|
||||
if ((mover.pass_flags & PASSTABLE || istype(mover, /obj/effect/meteor) || mover.throwing == 1) )
|
||||
return 1
|
||||
else if(ismob(mover) && allowed(mover))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
@@ -125,13 +125,13 @@
|
||||
to_chat(usr, "This robot has had its disabler removed!")
|
||||
return 0
|
||||
|
||||
if(T.recharge_time <= 2)
|
||||
if(T.charge_delay <= 2)
|
||||
to_chat(R, "Maximum cooling achieved for this hardpoint!")
|
||||
to_chat(usr, "There's no room for another cooling unit!")
|
||||
return 0
|
||||
|
||||
else
|
||||
T.recharge_time = max(2 , T.recharge_time - 4)
|
||||
T.charge_delay = max(2 , T.charge_delay - 4)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -214,4 +214,4 @@
|
||||
return 0
|
||||
|
||||
R.emagged = 1
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
bmark.pixel_x--
|
||||
bmark.pixel_y--
|
||||
|
||||
if(Proj.damage >= 20 || istype(Proj, /obj/item/projectile/practice))
|
||||
if(Proj.damage >= 20 || istype(Proj, /obj/item/projectile/beam/practice))
|
||||
bmark.icon_state = "scorch"
|
||||
bmark.dir = pick(NORTH,SOUTH,EAST,WEST) // random scorch design
|
||||
|
||||
@@ -178,4 +178,4 @@
|
||||
b2y1 = pixel_y + pick(1,1,1,1,2,2,3,3,4)
|
||||
b2y2 = pixel_y - pick(1,1,1,1,2,2,3,3,4)
|
||||
|
||||
Target.bulletholes.Add(src)
|
||||
Target.bulletholes.Add(src)
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
return
|
||||
to_chat(usr, "\blue Assembling grille...")
|
||||
|
||||
if (!do_after(usr, 10, target = src))
|
||||
if (!do_after(usr, 10, target = user))
|
||||
return
|
||||
|
||||
var /obj/structure/grille/F = new /obj/structure/grille/ ( usr.loc )
|
||||
|
||||
@@ -140,7 +140,6 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
|
||||
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("bookcase", /obj/structure/bookcase, 5, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), \
|
||||
new/datum/stack_recipe("crossbow frame", /obj/item/weapon/crossbowframe, 5, time = 25, one_per_turf = 0, on_floor = 0), \
|
||||
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("easel", /obj/structure/easel, 3, one_per_turf = 1, on_floor = 1), \
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
return
|
||||
if (R.time)
|
||||
to_chat(usr, "\blue Building [R.title] ...")
|
||||
if (!do_after(usr, R.time, target = src))
|
||||
if (!do_after(usr, R.time, target = usr))
|
||||
return
|
||||
if (src.amount < R.req_amount*multiplier)
|
||||
return
|
||||
@@ -194,20 +194,24 @@
|
||||
/obj/item/stack/proc/get_max_amount()
|
||||
return max_amount
|
||||
|
||||
/obj/item/stack/proc/split(mob/user, amt)
|
||||
var/obj/item/stack/F = new type(user, amt)
|
||||
F.copy_evidences(src)
|
||||
if(isliving(user))
|
||||
add_fingerprint(user)
|
||||
F.add_fingerprint(user)
|
||||
use(amt)
|
||||
return F
|
||||
|
||||
/obj/item/stack/attack_hand(mob/user as mob)
|
||||
if (user.get_inactive_hand() == src)
|
||||
var/obj/item/stack/F = new src.type( user, 1)
|
||||
F.copy_evidences(src)
|
||||
var/obj/item/stack/F = split(user, 1)
|
||||
user.put_in_hands(F)
|
||||
src.add_fingerprint(user)
|
||||
F.add_fingerprint(user)
|
||||
use(1)
|
||||
if (src && usr.machine==src)
|
||||
spawn(0) src.interact(usr)
|
||||
if(src && usr.machine == src)
|
||||
spawn(0)
|
||||
interact(usr)
|
||||
else
|
||||
..()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/stack/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
|
||||
@@ -1318,7 +1318,7 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
/obj/item/toy/russian_revolver
|
||||
name = "russian revolver"
|
||||
desc = "for fun and games!"
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
icon_state = "detective_gold"
|
||||
item_state = "gun"
|
||||
lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi'
|
||||
|
||||
@@ -107,6 +107,8 @@
|
||||
var/icon/side
|
||||
var/dat
|
||||
var/stamped = 0
|
||||
|
||||
var/obj/item/weapon/card/id/guest/guest_pass = null // Guest pass attached to the ID
|
||||
|
||||
/obj/item/weapon/card/id/New()
|
||||
..()
|
||||
@@ -120,6 +122,16 @@
|
||||
show(usr)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>It is too far away.</span>")
|
||||
if(guest_pass)
|
||||
to_chat(user, "<span class='notice'>There is a guest pass attached to this ID card</span>")
|
||||
if (world.time < guest_pass.expiration_time)
|
||||
to_chat(user, "<span class='notice'>It expires at [worldtime2text(guest_pass.expiration_time)].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>It expired at [worldtime2text(guest_pass.expiration_time)].</span>")
|
||||
to_chat(user, "<span class='notice'>It grants access to following areas:</span>")
|
||||
for (var/A in guest_pass.temp_access)
|
||||
to_chat(user, "<span class='notice'>[get_access_desc(A)].</span>")
|
||||
to_chat(user, "<span class='notice'>Issuing reason: [guest_pass.reason].</span>")
|
||||
|
||||
/obj/item/weapon/card/id/proc/show(mob/user as mob)
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/paper)
|
||||
@@ -170,7 +182,9 @@
|
||||
<img src=side.png height=80 width=80 border=4></td></tr></table>"
|
||||
|
||||
/obj/item/weapon/card/id/GetAccess()
|
||||
return access
|
||||
if(!guest_pass)
|
||||
return access
|
||||
return access | guest_pass.GetAccess()
|
||||
|
||||
/obj/item/weapon/card/id/GetID()
|
||||
return src
|
||||
@@ -204,9 +218,42 @@
|
||||
if(!stamped)
|
||||
dat+="<img src=large_[W.icon_state].png>"
|
||||
stamped = 1
|
||||
to_chat(usr, "You stamp the ID card!")
|
||||
to_chat(user, "You stamp the ID card!")
|
||||
else
|
||||
to_chat(usr, "This ID has already been stamped!")
|
||||
to_chat(user, "This ID has already been stamped!")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/card/id/guest))
|
||||
if(istype(src, /obj/item/weapon/card/id/guest))
|
||||
return
|
||||
var/obj/item/weapon/card/id/guest/G = W
|
||||
if(world.time > G.expiration_time)
|
||||
to_chat(user, "There's no point, the guest pass has expired.")
|
||||
return
|
||||
if(guest_pass)
|
||||
to_chat(user, "There's already a guest pass attached to this ID.")
|
||||
return
|
||||
if(G.registered_name != registered_name && G.registered_name != "NOT SPECIFIED")
|
||||
to_chat(user, "The guest pass cannot be attached to this ID")
|
||||
return
|
||||
if(!user.unEquip(G))
|
||||
return
|
||||
G.loc = src
|
||||
guest_pass = G
|
||||
|
||||
/obj/item/weapon/card/id/verb/remove_guest_pass()
|
||||
set name = "Remove Guest Pass"
|
||||
set category = "Object"
|
||||
set src in range(0)
|
||||
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
|
||||
if(guest_pass)
|
||||
to_chat(usr, "<span class='notice'>You remove the guest pass from this ID.</span>")
|
||||
guest_pass.forceMove(get_turf(src))
|
||||
guest_pass = null
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>There is no guest pass attached to this ID</span>")
|
||||
|
||||
/obj/item/weapon/card/id/silver
|
||||
name = "identification card"
|
||||
|
||||
@@ -41,12 +41,11 @@
|
||||
icon = 'icons/obj/chronos.dmi'
|
||||
icon_state = "chronogun"
|
||||
item_state = "chronogun"
|
||||
w_class = 3.0
|
||||
projectile_type = "/obj/item/projectile/energy/chrono_beam"
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
charge_cost = 0
|
||||
fire_delay = 50
|
||||
w_class = 3
|
||||
flags = NODROP
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/chrono_beam)
|
||||
can_charge = 0
|
||||
fire_delay = 50
|
||||
var/obj/item/weapon/chrono_eraser/TED = null
|
||||
var/obj/effect/chrono_field/field = null
|
||||
var/turf/startpos = null
|
||||
@@ -60,12 +59,13 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/gun/energy/chrono_gun/dropped()
|
||||
..()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/gun/energy/chrono_gun/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/chrono_gun/Fire()
|
||||
/obj/item/weapon/gun/energy/chrono_gun/process_fire()
|
||||
if(field)
|
||||
field_disconnect(field)
|
||||
..()
|
||||
@@ -125,18 +125,23 @@
|
||||
nodamage = 1
|
||||
var/obj/item/weapon/gun/energy/chrono_gun/gun = null
|
||||
|
||||
/obj/item/projectile/energy/chrono_beam/process()
|
||||
/obj/item/projectile/energy/chrono_beam/fire()
|
||||
gun = firer.get_active_hand()
|
||||
if(istype(gun))
|
||||
return ..()
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/item/projectile/energy/chrono_beam/on_hit(var/atom/target)
|
||||
/obj/item/projectile/energy/chrono_beam/on_hit(atom/target)
|
||||
if(target && gun && isliving(target))
|
||||
var/obj/effect/chrono_field/F = new(target.loc, target, gun)
|
||||
gun.field_connect(F)
|
||||
|
||||
/obj/item/ammo_casing/energy/chrono_beam
|
||||
name = "eradication beam"
|
||||
projectile_type = /obj/item/projectile/energy/chrono_beam
|
||||
icon_state = "chronobolt"
|
||||
e_cost = 0
|
||||
|
||||
/obj/effect/chrono_field
|
||||
name = "eradication field"
|
||||
@@ -256,4 +261,4 @@
|
||||
|
||||
|
||||
#undef CHRONO_BEAM_RANGE
|
||||
#undef CHRONO_FRAME_COUNT
|
||||
#undef CHRONO_FRAME_COUNT
|
||||
|
||||
@@ -368,8 +368,26 @@
|
||||
update_icon()
|
||||
return
|
||||
if(H.heart_attack)
|
||||
H.heart_attack = 0
|
||||
if(H.stat == 2)
|
||||
if(!H.get_int_organ(/obj/item/organ/internal/heart) && !H.get_int_organ(/obj/item/organ/internal/brain/slime)) //prevents defibing someone still alive suffering from a heart attack attack if they lack a heart
|
||||
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Failed to pick up any heart electrical activity.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
busy = 0
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
H.heart_attack = 0
|
||||
user.visible_message("<span class='boldnotice'>[defib] pings: Cardiac arrhythmia corrected.</span>")
|
||||
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
|
||||
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
playsound(get_turf(src), "bodyfall", 50, 1)
|
||||
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
|
||||
defib.deductcharge(revivecost)
|
||||
busy = 0
|
||||
cooldown = 1
|
||||
update_icon()
|
||||
defib.cooldowncheck(user)
|
||||
return
|
||||
if(H.stat == DEAD)
|
||||
var/health = H.health
|
||||
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
|
||||
playsound(get_turf(src), "bodyfall", 50, 1)
|
||||
@@ -377,7 +395,7 @@
|
||||
for(var/obj/item/organ/external/O in H.organs)
|
||||
total_brute += O.brute_dam
|
||||
total_burn += O.burn_dam
|
||||
if(total_burn <= 180 && total_brute <= 180 && !H.suiciding && !ghost && tplus < tlimit && !(NOCLONE in H.mutations))
|
||||
if(total_burn <= 180 && total_brute <= 180 && !H.suiciding && !ghost && tplus < tlimit && !(NOCLONE in H.mutations) && (H.get_int_organ(/obj/item/organ/internal/heart) || H.get_int_organ(/obj/item/organ/internal/brain/slime)))
|
||||
tobehealed = min(health + threshold, 0) // It's HILARIOUS without this min statement, let me tell you
|
||||
tobehealed -= 5 //They get 5 of each type of damage healed so excessive combined damage will not immediately kill them after they get revived
|
||||
H.adjustOxyLoss(tobehealed)
|
||||
|
||||
@@ -0,0 +1,456 @@
|
||||
/obj/item/weapon/nullrod
|
||||
name = "null rod"
|
||||
desc = "A rod of pure obsidian, its very presence disrupts and dampens the powers of Nar-Sie's followers."
|
||||
icon_state = "nullrod"
|
||||
item_state = "nullrod"
|
||||
force = 18
|
||||
throw_speed = 3
|
||||
throw_range = 4
|
||||
throwforce = 10
|
||||
w_class = 1
|
||||
var/reskinned = FALSE
|
||||
var/list/fluff_transformations = list() //does it have any special transformations only accessible to it? Should only be subtypes of /obj/item/weapon/nullrod
|
||||
|
||||
/obj/item/weapon/nullrod/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is killing \himself with \the [src.name]! It looks like \he's trying to get closer to god!</span>")
|
||||
return (BRUTELOSS|FIRELOSS)
|
||||
|
||||
/obj/item/weapon/nullrod/attack(mob/M, mob/living/carbon/user)
|
||||
..()
|
||||
if(M.mind)
|
||||
if(M.mind.vampire)
|
||||
if(ishuman(M))
|
||||
if(!M.mind.vampire.get_ability(/datum/vampire_passive/full))
|
||||
to_chat(M, "<span class='warning'>The nullrod's power interferes with your own!</span>")
|
||||
M.mind.vampire.nullified = max(5, M.mind.vampire.nullified + 2)
|
||||
|
||||
/obj/item/weapon/nullrod/attack_self(mob/user)
|
||||
if(reskinned)
|
||||
return
|
||||
if(user.mind && (user.mind.assigned_role == "Chaplain"))
|
||||
reskin_holy_weapon(user)
|
||||
|
||||
/obj/item/weapon/nullrod/proc/reskin_holy_weapon(mob/M)
|
||||
var/list/holy_weapons_list = typesof(/obj/item/weapon/nullrod) - typesof(/obj/item/weapon/nullrod/fluff)
|
||||
if(fluff_transformations.len)
|
||||
for(var/thing in fluff_transformations)
|
||||
holy_weapons_list += thing
|
||||
var/list/display_names = list()
|
||||
for(var/V in holy_weapons_list)
|
||||
var/atom/A = V
|
||||
display_names += initial(A.name)
|
||||
|
||||
var/choice = input(M,"What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names
|
||||
if(!src || !choice || !in_range(M, src) || M.incapacitated() || reskinned)
|
||||
return
|
||||
|
||||
var/index = display_names.Find(choice)
|
||||
var/A = holy_weapons_list[index]
|
||||
|
||||
var/obj/item/weapon/nullrod/holy_weapon = new A
|
||||
|
||||
feedback_set_details("chaplain_weapon","[choice]")
|
||||
|
||||
if(holy_weapon)
|
||||
holy_weapon.reskinned = TRUE
|
||||
M.unEquip(src)
|
||||
M.put_in_active_hand(holy_weapon)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/nullrod/godhand
|
||||
icon_state = "disintegrate"
|
||||
item_state = "disintegrate"
|
||||
name = "god hand"
|
||||
desc = "This hand of yours glows with an awesome power!"
|
||||
flags = ABSTRACT | NODROP
|
||||
w_class = 5
|
||||
hitsound = 'sound/weapons/sear.ogg'
|
||||
damtype = BURN
|
||||
attack_verb = list("punched", "cross countered", "pummeled")
|
||||
|
||||
/obj/item/weapon/nullrod/staff
|
||||
icon_state = "godstaff-red"
|
||||
item_state = "godstaff-red"
|
||||
name = "red holy staff"
|
||||
desc = "It has a mysterious, protective aura."
|
||||
w_class = 5
|
||||
force = 5
|
||||
slot_flags = SLOT_BACK
|
||||
|
||||
/obj/item/weapon/nullrod/staff/IsShield()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/nullrod/staff/blue
|
||||
name = "blue holy staff"
|
||||
icon_state = "godstaff-blue"
|
||||
item_state = "godstaff-blue"
|
||||
|
||||
/obj/item/weapon/nullrod/claymore
|
||||
icon_state = "claymore"
|
||||
item_state = "claymore"
|
||||
name = "holy claymore"
|
||||
desc = "A weapon fit for a crusade!"
|
||||
w_class = 4
|
||||
slot_flags = SLOT_BACK|SLOT_BELT
|
||||
sharp = 1
|
||||
edge = 1
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
/obj/item/weapon/nullrod/claymore/IsShield()
|
||||
if(prob(30))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/nullrod/claymore/darkblade
|
||||
icon_state = "cultblade"
|
||||
item_state = "cultblade"
|
||||
name = "dark blade"
|
||||
desc = "Spread the glory of the dark gods!"
|
||||
slot_flags = SLOT_BELT
|
||||
hitsound = 'sound/hallucinations/growl1.ogg'
|
||||
|
||||
/obj/item/weapon/nullrod/claymore/chainsaw_sword
|
||||
icon_state = "chainswordon"
|
||||
item_state = "chainswordon"
|
||||
name = "sacred chainsaw sword"
|
||||
desc = "Suffer not a heretic to live."
|
||||
slot_flags = SLOT_BELT
|
||||
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
|
||||
hitsound = 'sound/weapons/chainsaw.ogg'
|
||||
|
||||
/obj/item/weapon/nullrod/claymore/glowing
|
||||
icon_state = "swordon"
|
||||
item_state = "swordon"
|
||||
name = "force weapon"
|
||||
desc = "The blade glows with the power of faith. Or possibly a battery."
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
/obj/item/weapon/nullrod/claymore/katana
|
||||
name = "hanzo steel"
|
||||
desc = "Capable of cutting clean through a holy claymore."
|
||||
icon_state = "katana"
|
||||
item_state = "katana"
|
||||
slot_flags = SLOT_BELT | SLOT_BACK
|
||||
|
||||
/obj/item/weapon/nullrod/claymore/multiverse
|
||||
name = "extradimensional blade"
|
||||
desc = "Once the harbringer of a interdimensional war, now a dormant souvenir. Still sharp though."
|
||||
icon_state = "multiverse"
|
||||
item_state = "multiverse"
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
/obj/item/weapon/nullrod/claymore/saber
|
||||
name = "light energy sword"
|
||||
hitsound = 'sound/weapons/blade1.ogg'
|
||||
icon_state = "swordblue"
|
||||
item_state = "swordblue"
|
||||
desc = "If you strike me down, I shall become more robust than you can possibly imagine."
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
/obj/item/weapon/nullrod/claymore/saber/red
|
||||
name = "dark energy sword"
|
||||
icon_state = "swordred"
|
||||
item_state = "swordred"
|
||||
desc = "Woefully ineffective when used on steep terrain."
|
||||
|
||||
/obj/item/weapon/nullrod/claymore/saber/pirate
|
||||
name = "nautical energy sword"
|
||||
icon_state = "cutlass1"
|
||||
item_state = "cutlass1"
|
||||
desc = "Convincing HR that your religion involved piracy was no mean feat."
|
||||
|
||||
/obj/item/weapon/nullrod/sord
|
||||
name = "\improper UNREAL SORD"
|
||||
desc = "This thing is so unspeakably HOLY you are having a hard time even holding it."
|
||||
icon_state = "sord"
|
||||
item_state = "sord"
|
||||
slot_flags = SLOT_BELT
|
||||
force = 4.13
|
||||
throwforce = 1
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
/obj/item/weapon/nullrod/scythe
|
||||
icon_state = "scythe0"
|
||||
item_state = "scythe0"
|
||||
name = "reaper scythe"
|
||||
desc = "Ask not for whom the bell tolls..."
|
||||
w_class = 4
|
||||
armour_penetration = 35
|
||||
slot_flags = SLOT_BACK
|
||||
sharp = 1
|
||||
edge = 1
|
||||
attack_verb = list("chopped", "sliced", "cut", "reaped")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
|
||||
/obj/item/weapon/nullrod/scythe/vibro
|
||||
icon_state = "hfrequency0"
|
||||
item_state = "hfrequency1"
|
||||
name = "high frequency blade"
|
||||
desc = "Bad references are the DNA of the soul."
|
||||
attack_verb = list("chopped", "sliced", "cut", "zandatsu'd")
|
||||
|
||||
/obj/item/weapon/nullrod/scythe/talking
|
||||
icon_state = "talking_sword"
|
||||
item_state = "talking_sword"
|
||||
name = "possessed blade"
|
||||
desc = "When the station falls into chaos, it's nice to have a friend by your side."
|
||||
attack_verb = list("chopped", "sliced", "cut")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
var/possessed = FALSE
|
||||
|
||||
/obj/item/weapon/nullrod/scythe/talking/attack_self(mob/living/user)
|
||||
if(possessed)
|
||||
return
|
||||
|
||||
to_chat(user, "You attempt to wake the spirit of the blade...")
|
||||
|
||||
possessed = TRUE
|
||||
|
||||
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as the spirit of [user.real_name]'s blade?", ROLE_PAI, 0, 100)
|
||||
var/mob/dead/observer/theghost = null
|
||||
|
||||
if(candidates.len)
|
||||
theghost = pick(candidates)
|
||||
var/mob/living/simple_animal/shade/S = new(src)
|
||||
S.real_name = name
|
||||
S.name = name
|
||||
S.ckey = theghost.ckey
|
||||
var/input = stripped_input(S,"What are you named?", ,"", MAX_NAME_LEN)
|
||||
|
||||
if(src && input)
|
||||
name = input
|
||||
S.real_name = input
|
||||
S.name = input
|
||||
else
|
||||
to_chat(user, "The blade is dormant. Maybe you can try again later.")
|
||||
possessed = FALSE
|
||||
|
||||
/obj/item/weapon/nullrod/scythe/talking/Destroy()
|
||||
for(var/mob/living/simple_animal/shade/S in contents)
|
||||
to_chat(S, "You were destroyed!")
|
||||
S.ghostize()
|
||||
qdel(S)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/nullrod/hammmer
|
||||
icon_state = "hammeron"
|
||||
item_state = "hammeron"
|
||||
name = "relic war hammer"
|
||||
desc = "This war hammer cost the chaplain fourty thousand space dollars."
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = 5
|
||||
attack_verb = list("smashed", "bashed", "hammered", "crunched")
|
||||
|
||||
/obj/item/weapon/nullrod/chainsaw
|
||||
name = "chainsaw hand"
|
||||
desc = "Good? Bad? You're the guy with the chainsaw hand."
|
||||
icon_state = "chainsaw1"
|
||||
item_state = "mounted_chainsaw"
|
||||
w_class = 5
|
||||
flags = NODROP | ABSTRACT
|
||||
sharp = 1
|
||||
edge = 1
|
||||
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
|
||||
hitsound = 'sound/weapons/chainsaw.ogg'
|
||||
|
||||
/obj/item/weapon/nullrod/clown
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "clownrender"
|
||||
item_state = "gold_horn"
|
||||
name = "clown dagger"
|
||||
desc = "Used for absolutely hilarious sacrifices."
|
||||
hitsound = 'sound/items/bikehorn.ogg'
|
||||
sharp = 1
|
||||
edge = 1
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut", "honked")
|
||||
|
||||
/obj/item/weapon/nullrod/whip
|
||||
name = "holy whip"
|
||||
desc = "What a terrible night to be on Space Station 13."
|
||||
icon_state = "chain"
|
||||
item_state = "chain"
|
||||
slot_flags = SLOT_BELT
|
||||
attack_verb = list("whipped", "lashed")
|
||||
hitsound = 'sound/weapons/slash.ogg'
|
||||
|
||||
/obj/item/weapon/nullrod/whip/afterattack(atom/movable/AM, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(istype(AM, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if(is_shadow(H))
|
||||
var/phrase = pick("Die monster! You don't belong in this world!!!", "You steal men's souls and make them your slaves!!!", "Your words are as empty as your soul!!!", "Mankind ill needs a savior such as you!!!")
|
||||
user.say("[phrase]")
|
||||
H.adjustBruteLoss(8) //Bonus damage
|
||||
|
||||
/obj/item/weapon/nullrod/fedora
|
||||
name = "athiest's fedora"
|
||||
desc = "The brim of the hat is as sharp as your wit. Throwing it at someone would hurt almost as much as disproving the existence of God."
|
||||
icon_state = "fedora"
|
||||
item_state = "fedora"
|
||||
slot_flags = SLOT_HEAD
|
||||
icon = 'icons/obj/clothing/hats.dmi'
|
||||
force = 0
|
||||
throw_speed = 4
|
||||
throw_range = 7
|
||||
throwforce = 20
|
||||
|
||||
/obj/item/weapon/nullrod/armblade
|
||||
name = "dark blessing"
|
||||
desc = "Particularly twisted deities grant gifts of dubious value."
|
||||
icon_state = "arm_blade"
|
||||
item_state = "arm_blade"
|
||||
flags = ABSTRACT | NODROP
|
||||
w_class = 5
|
||||
sharp = 1
|
||||
edge = 1
|
||||
|
||||
/obj/item/weapon/nullrod/carp
|
||||
name = "carp-sie plushie"
|
||||
desc = "An adorable stuffed toy that resembles the god of all carp. The teeth look pretty sharp. Activate it to recieve the blessing of Carp-Sie."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "carpplushie"
|
||||
item_state = "carp_plushie"
|
||||
force = 15
|
||||
attack_verb = list("bitten", "eaten", "fin slapped")
|
||||
hitsound = 'sound/weapons/bite.ogg'
|
||||
var/used_blessing = FALSE
|
||||
|
||||
/obj/item/weapon/nullrod/carp/attack_self(mob/living/user)
|
||||
if(used_blessing)
|
||||
return
|
||||
if(user.mind && (user.mind.assigned_role != "Chaplain"))
|
||||
return
|
||||
to_chat(user, "You are blessed by Carp-Sie. Wild space carp will no longer attack you.")
|
||||
user.faction |= "carp"
|
||||
used_blessing = TRUE
|
||||
|
||||
/obj/item/weapon/nullrod/claymore/bostaff //May as well make it a "claymore" and inherit the blocking
|
||||
name = "monk's staff"
|
||||
desc = "A long, tall staff made of polished wood. Traditionally used in ancient old-Earth martial arts, now used to harass the clown."
|
||||
w_class = 4
|
||||
force = 15
|
||||
slot_flags = SLOT_BACK
|
||||
sharp = 0
|
||||
edge = 0
|
||||
hitsound = "swing_hit"
|
||||
attack_verb = list("smashed", "slammed", "whacked", "thwacked")
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "bostaff0"
|
||||
item_state = "bostaff0"
|
||||
|
||||
/obj/item/weapon/nullrod/claymore/bostaff/IsShield()
|
||||
if(prob(40))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/nullrod/tribal_knife
|
||||
icon_state = "crysknife"
|
||||
item_state = "crysknife"
|
||||
name = "arrhythmic knife"
|
||||
w_class = 5
|
||||
desc = "They say fear is the true mind killer, but stabbing them in the head works too. Honour compels you to not sheathe it once drawn."
|
||||
sharp = 1
|
||||
edge = 1
|
||||
slot_flags = null
|
||||
flags = HANDSLOW
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
/obj/item/weapon/nullrod/tribal_knife/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
|
||||
/obj/item/weapon/nullrod/tribal_knife/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/nullrod/tribal_knife/process()
|
||||
slowdown = rand(-2, 2)
|
||||
|
||||
/obj/item/weapon/nullrod/pitchfork
|
||||
icon_state = "pitchfork0"
|
||||
item_state = "pitchfork0"
|
||||
name = "unholy pitchfork"
|
||||
w_class = 3
|
||||
desc = "Holding this makes you look absolutely devilish."
|
||||
attack_verb = list("poked", "impaled", "pierced", "jabbed")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
sharp = 1
|
||||
edge = 1
|
||||
|
||||
/obj/item/weapon/nullrod/rosary
|
||||
icon_state = "rosary"
|
||||
item_state = null
|
||||
name = "prayer beads"
|
||||
desc = "A set of prayer beads used by many of the more traditional religions in space.<br>Vampires and other unholy abominations have learned to fear these."
|
||||
force = 0
|
||||
throwforce = 0
|
||||
var/praying = 0
|
||||
|
||||
/obj/item/weapon/nullrod/rosary/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
|
||||
|
||||
/obj/item/weapon/nullrod/rosary/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if(!user.mind || user.mind.assigned_role != "Chaplain")
|
||||
to_chat(user, "<span class='notice'>You are not close enough with [ticker.Bible_deity_name] to use [src].</span>")
|
||||
return
|
||||
|
||||
if(praying)
|
||||
to_chat(user, "<span class='notice'>You are already using [src].</span>")
|
||||
|
||||
user.visible_message("<span class='info'>[user] kneels[M == user ? null : " next to [M]"] and begins to utter a prayer to [ticker.Bible_deity_name].</span>", \
|
||||
"<span class='info'>You kneel[M == user ? null : " next to [M]"] and begin a prayer to [ticker.Bible_deity_name].</span>")
|
||||
|
||||
praying = 1
|
||||
if(do_after(user, 150, target = M))
|
||||
if(istype(M, /mob/living/carbon/human)) // This probably should not work on vulps. They're unholy abominations.
|
||||
var/mob/living/carbon/human/target = M
|
||||
|
||||
if(target.mind)
|
||||
if(iscultist(target))
|
||||
ticker.mode.remove_cultist(target.mind) // This proc will handle message generation.
|
||||
praying = 0
|
||||
return
|
||||
|
||||
if(target.mind.vampire && !target.mind.vampire.get_ability(/datum/vampire_passive/full)) // Getting a full prayer off on a vampire will interrupt their powers for a large duration.
|
||||
target.mind.vampire.nullified = max(120, target.mind.vampire.nullified + 120)
|
||||
to_chat(target, "<span class='userdanger'>[user]'s prayer to [ticker.Bible_deity_name] has interfered with your power!</span>")
|
||||
praying = 0
|
||||
return
|
||||
|
||||
if(prob(25))
|
||||
to_chat(target, "<span class='notice'>[user]'s prayer to [ticker.Bible_deity_name] has eased your pain!</span>")
|
||||
target.adjustToxLoss(-5)
|
||||
target.adjustOxyLoss(-5)
|
||||
target.adjustBruteLoss(-5)
|
||||
target.adjustFireLoss(-5)
|
||||
|
||||
praying = 0
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Your prayer to [ticker.Bible_deity_name] was interrupted.</span>")
|
||||
praying = 0
|
||||
|
||||
/obj/item/weapon/nullrod/rosary/process()
|
||||
if(istype(loc, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/holder = loc
|
||||
|
||||
if(src == holder.l_hand || src == holder.r_hand) // Holding this in your hand will
|
||||
for(var/mob/living/carbon/human/M in range(5))
|
||||
if(M.mind.vampire && !M.mind.vampire.get_ability(/datum/vampire_passive/full))
|
||||
M.mind.vampire.nullified = max(5, M.mind.vampire.nullified + 2)
|
||||
if(prob(10))
|
||||
to_chat(M, "<span class='userdanger'>Being in the presence of [holder]'s [src] is interfering with your powers!</span>")
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "implant"
|
||||
icon = 'icons/obj/implants.dmi'
|
||||
icon_state = "generic" //Shows up as the action button icon
|
||||
action_button_is_hands_free = 1
|
||||
action_button_custom_type = /datum/action/item_action/hands_free
|
||||
origin_tech = "materials=2;biotech=3;programming=2"
|
||||
|
||||
var/activated = 1 //1 for implant types that can be activated, 0 for ones that are "always on" like loyalty implants
|
||||
|
||||
@@ -56,11 +56,11 @@
|
||||
ticker.mode.traitors += H.mind
|
||||
H.mind.special_role = "traitor"
|
||||
to_chat(H, "<span class='warning'><B>You're now completely loyal to [user.name]!</B> You now must lay down your life to protect them and assist in their goals at any cost.</span>")
|
||||
var/datum/objective/protect/p = new
|
||||
p.owner = H.mind
|
||||
p.target = user:mind
|
||||
p.explanation_text = "Obey every order from and protect [user:real_name], the [user:mind:assigned_role=="MODE" ? (user:mind:special_role) : (user:mind:assigned_role)]."
|
||||
H.mind.objectives += p
|
||||
var/datum/objective/protect/mindslave/MS = new
|
||||
MS.owner = H.mind
|
||||
MS.target = user:mind
|
||||
MS.explanation_text = "Obey every order from and protect [user:real_name], the [user:mind:assigned_role=="MODE" ? (user:mind:special_role) : (user:mind:assigned_role)]."
|
||||
H.mind.objectives += MS
|
||||
for(var/datum/objective/objective in H.mind.objectives)
|
||||
to_chat(H, "<B>Objective #1</B>: [objective.explanation_text]")
|
||||
|
||||
@@ -71,10 +71,16 @@
|
||||
var/datum/mindslaves/slaved = user.mind.som
|
||||
H.mind.som = slaved
|
||||
slaved.serv += H
|
||||
slaved.add_serv_hud(user.mind,"syndicate")//handles master servent icons
|
||||
slaved.add_serv_hud(H.mind,"mindslave")
|
||||
slaved.add_serv_hud(user.mind, "master") //handles master servent icons
|
||||
slaved.add_serv_hud(H.mind, "mindslave")
|
||||
|
||||
log_admin("[ckey(user.key)] has mind-slaved [ckey(H.key)].")
|
||||
activated = 1
|
||||
return 1
|
||||
return 0
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/implant/traitor/removed(mob/target)
|
||||
if(..())
|
||||
ticker.mode.remove_traitor_mind(target.mind)
|
||||
return 1
|
||||
return 0
|
||||
@@ -1815,18 +1815,6 @@
|
||||
</ol>
|
||||
<br><br>
|
||||
|
||||
<h1><a name="atmos"><B>Atmospherics Technician</B></a></h1><BR>
|
||||
<ol>
|
||||
<li>Atmospheric Technicians are permitted to completely repipe the Atmospherics Piping Setup, provided they do not pump harmful gases into anywhere except the Turbine;</li>
|
||||
<li>Atmospheric Technicians are not permitted to create volatile mixes using Plasma and Oxygen, nor are they permitted to create any potentially harmful mixes with Carbon Dioxide and/or Nitrous Oxide. An exception is made when working with the Turbine;</li>
|
||||
<li>Atmospheric Technicians are permitted to cool Plasma and store it for later use in Radiation Collectors. Likewise, they are permitted to cool Nitrogen or Carbon Dioxide and store it for use as coolant for the Supermatter Engine;</li>
|
||||
<li>Atmospheric Technicians are not permitted to take the axe out of its case unless there is an immediate and urgent threat to their life or urgent access to crisis locations is necessary. The axe must be returned to the case afterwards, and the case locked;</li>
|
||||
<li>Atmospheric Technicians are not permitted to tamper with the default values on Air Alarms. They are, however, permitted to create small, acclimatized rooms for species that require special atmospheric conditions (such as Plasmamen and Vox), provided they receive express permission from the Chief Engineer;</li>
|
||||
<li>Atmospheric Technicians must periodically check on the Central Alarms Computer, in periods of, at most, thirty (30) minutes;</li>
|
||||
<li>Atmospheric Technicians must respond promptly to piping and station breaches. Failure to report within fifteen (15) minutes will be considered a breach of Standard Operating Procedure, unless there are no spare Atmospheric Technicians to report, or an Engineer has arrived on scene first. All Hazard Zones must be cordoned off with Engineering Tape, for the sake of everyone else</li>
|
||||
</ol>
|
||||
<br><br>
|
||||
|
||||
<h1><a name="sf"><B>Shaft Miner</B></a></h1><BR>
|
||||
<ol>
|
||||
<li>Shaft Miners are not permitted to bring Gibtonite aboard the station;</li>
|
||||
@@ -2412,7 +2400,104 @@
|
||||
<li>Demotion of Chief Engineer and reparation of Engine if no threat manifests.</li>
|
||||
</ul>
|
||||
<br><br>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
"}
|
||||
|
||||
/obj/item/weapon/book/manual/sop_command
|
||||
name = "Command Standard Operating Procedures"
|
||||
desc = "A set of guidelines aiming at the safe conduct of all Command activities."
|
||||
icon_state = "book4"
|
||||
author = "Nanotrasen"
|
||||
title = "Command Standard Operating Procedures"
|
||||
dat = {"
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
h1 {font-size: 15px; margin: 15px 0px 5px;}
|
||||
li {margin: 2px 0px 2px 15px;}
|
||||
ul {list-style: none; margin: 5px; padding: 0px;}
|
||||
ol {margin: 5px; padding: 0px 15px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<font face="Verdana" color=black>
|
||||
|
||||
<h1><a name="Contents">Contents</a></h1>
|
||||
<ol>
|
||||
<li><a href="#foreword">Foreword</a></li>
|
||||
<li><a href="#cap">Captain</a></li>
|
||||
<li><a href="#hop">Head of Personnel</a></li>
|
||||
<li><a href="#ntrep">NanoTrasen Representative</a></li>
|
||||
<li><a href="#bs">Blueshield Officer</a></li>
|
||||
<li><a href="#ai">AI</a></li>
|
||||
</ol>
|
||||
<br><BR>
|
||||
|
||||
<h1><a name="foreword"><U><B>FOREWORD</B></U></a></h1><BR>
|
||||
Job SOP should not be a considered a checklist of conditions to fire someone over, and should not be rigidly followed to the letter in detriment of circumstances and context.
|
||||
As always, SOP can be malleable if the situation so requires, and the decision to punish a crewmember for breaching it ultimately falls onto the relevant Head of Staff,
|
||||
for Department Members, or Captain, for the Head of Staff.<BR><BR>
|
||||
|
||||
<h1><a name="cap"><B>Captain</B></a></h1><BR>
|
||||
<ol>
|
||||
<li>The Captain is not permitted to perform regular Security Duty. However, they may still assist Security if they are understaffed, or if they see a crime being committed. However, the Captain is not permitted to take items from the Armory under normal circumstances, unless authorized by the Head of Security. In addition, the Captain may not requisition weaponry for themselves from Cargo and/or Science, unless there's an immediate threat to station and/or crew;</li>
|
||||
<li>If a Department lacks a Head of Staff, the Captain should make reasonable efforts to appoint an Acting Head of Staff, if there are available personnel to fill the position;</li>
|
||||
<li>The Captain is to ensure that Space Law is being correctly applied. This should be done in cooperation with the Head of Security;</li>
|
||||
<li>The Captain is not to leave the NSS Cyberiad unless given specific permission by Central Command, or it happens to be the end of the shift. This includes via space or via the Gateway. To do so is to be considered abandoning their posts and is grounds for termination;</li>
|
||||
<li>The Captain must keep the Nuclear Authentication Disk on their person at all times or, failing that, in the possession of the Head of Security or Blueshield;</li>
|
||||
<li>The Captain is to attempt to resolve every issue that arises in Command locally before contacting Central Command;</li>
|
||||
<li>The Captain is not permitted to carry their Antique Laser Gun or Space Armor unless there's an immediate emergency that requires attending to;</li>
|
||||
<li>The Captain, despite being in charge of the Cyberiad, is not independent from NanoTrasen. Any attempts to disregard general company policy are to be considered an instant condition for contract termination;</li>
|
||||
<li>The Captain may only promote personnel to a Acting Head of Staff position if there is no assigned Head of Staff associated with the Department. Said Acting Head of Staff must be a member of the Department they are to lead. See below for more information on Chain of Command;</li>
|
||||
<li>The Captain may not fire any Head of Staff without reasonable justification (ie, incompetency, criminal activity, or otherwise any action that endangers/compromises the station and/or crew). The Captain may not fire any Central Command VIPs (ie, Blueshield, Magistrate, NanoTrasen Representative) without permission from Central Command, unless they are blatantly acting against the well-being and safety of the crew and station.</li>
|
||||
</ol><BR>
|
||||
|
||||
<h1><a name="hop"><B>Head of Personnel</B></a></h1><BR>
|
||||
<ol>
|
||||
<li>The Head of Personnel may not transfer any personnel to another Department without authorization from the relevant Head of Staff. If no Head of Staff is available, the Head of Personnel may make a judgement call. This does not apply to Security, which always requires authorization from the Head of Security, or Genetics, which requires both Chief Medical Officer and Research Director approval. If there is no Head of Security active, no transfers are allowed to Security without authorization from the Captain;</li>
|
||||
<li>The Head of Personnel may not give any personnel increased access without authorization from the relevant Head of Staff. This includes the Head of Personnel. In addition, the Head of Personnel may only give Captain-Level access to someone if they are the Acting Captain. This access is to be removed when a proper Captain arrives on the station;</li>
|
||||
<li>The Head of Personnel may not increase any Job Openings unless the relevant Head of Staff approves;</li>
|
||||
<li>The Head of Personnel may not fire any personnel without authorization from the relevant Head of Staff, unless other conditions apply (see Space Law and General Standard Operating Procedure);</li>
|
||||
<li>The Head of Personnel may not promote any personnel to the following Jobs without authorization from Central Command: Barber, Brig Physician, NanoTrasen Representative, Blueshield, Security Pod Pilot, Mechanic and Magistrate; (This is due to them being karma locked. Do not promote people to these positions without approval from the Administrators);</li>
|
||||
<li>The Head of Personnel is free to utilize paperwork at their discretion. However, during major station emergencies, expediency should take precedence over bureaucracy;</li>
|
||||
<li>The Head of Personnel may not leave their office unmanned if there are personnel waiting in line. Failure to respond to personnel with a legitimate request within ten (10) minutes, either via radio or in person, is to be considered a breach of Standard Operating Procedure;</li>
|
||||
<li>Despite nominally being in charge of Supply, the Head of Personnel should allow the Quartermaster to run the Department, unless they prove themselves to be incompetent/dangerous;</li>
|
||||
<li>The Head of Personnel is bound to the same rules regarding ordering Cargo Crates as the Quartermaster and Cargo Technicians. In addition, the Head of Personnel may not order unneeded, non-essential items against the wishes of Cargo;</li>
|
||||
<li>The Head of Personnel is not permitted to perform Security duty. The Head of Personnel is permitted to carry an Energy Gun, for self-defence only.</li>
|
||||
</ol><BR>
|
||||
|
||||
<h1><a name="ntrep"><B>NanoTrasen Representative</B></a></h1><BR>
|
||||
<ol>
|
||||
<li>The NanoTrasen Representative is to ensure that every Department is following Standard Operating Procedure, up to and including the respective Head of Staff. If a Head of Staff is not available for a Department, the NanoTrasen Representative must ensure that the Captain appoints an Acting Head of Staff for said Department;</li>
|
||||
<li>The NanoTrasen Representative must attempt to resolve any breach of Standard Operating Procedure locally before contacting Central Command. This is an imperative: Standard Operating Procedure should always be followed unless there is a very good reason not to;</li>
|
||||
<li>The NanoTrasen Representative must, together with the Magistrate and Head of Security, ensure that Space Law is being followed and correctly applied;</li>
|
||||
<li>The NanoTrasen Representative may not threaten the use of a fax in order to gain leverage over any personnel, up to and including Command. In addition they may not threaten to fire, or have Central Command, fire anyone, unless they actually possess a demotion note;</li>
|
||||
<li>The NanoTrasen Representative is permitted to carry their Stun-Cane, or a Telescopic Baton if the Stun-Cane is lost.</li>
|
||||
</ol><BR>
|
||||
|
||||
<h1><a name="bs"><B>Blueshield Officer</B></a></h1><BR>
|
||||
<ol>
|
||||
<li>The Blueshield may not conduct arrests under the same conditions as Security. However, they may apprehend any personnel that trespass on a Head of Staff Office or Command Area, any personnel that steal from those locations, or any personnel that steal from and/or injure any Head of Staff or Central Command VIP. However, all apprehended personnel are to be processed by Security personnel;</li>
|
||||
<li>The Blueshield is to put the lives of Command over those of any other personnel, the Blueshield included. Their continued well-being is the Blueshield's top priority. This includes applying basic first aid and making sure they are revived if killed;</li>
|
||||
<li>The Blueshield is to protect the lives of Command personnel, not follow their orders to a fault. The Blueshield is not to interfere with legal demotions or arrests. To do so is to place themselves under the Special Modifier Aiding and Abetting;</li>
|
||||
<li>The Blueshield is not to apply Lethal Force unless there is a clear and present danger to their life, or to the life of a member of Command, and the assailant cannot be non-lethally detained.</li>
|
||||
</ol><BR>
|
||||
|
||||
<h1><a name="ai"><B>AI</B></a></h1><BR>
|
||||
<b><i>The following are procedures for AI Maintenance:</i></b><br>
|
||||
<ol>
|
||||
<li>Only the Captain or Research Director may enter the AI Upload to perform Law Changes (see below), and only the Captain, Research Director or Chief Engineer may enter the AI Core to perform a Carding (see below);</li>
|
||||
<li> No Law Changes are to be performed without approval from the Captain and Research Director. The only Lawsets to be used are those provided by NanoTrasen. Failure to legally perform a Law Change is to be considered Sabotage. Command must be informed prior to the Law Change, and all objections must be taken into consideration. If the number of Command personnel opposing the Law Change is greater than the number of Command personnel in favour, the Law Change is not to be done. If the Law Change is performed, the crew is to be immediately informed of the new Law(s);</li>
|
||||
<li>The AI may not be Carded unless it it clearly malfunctioning or subverted. However, any member of Command may card it if the AI agrees to it, either at the end of the shift, or due to external circumstances (such as massive damage to the AI Satellite);</li>
|
||||
<li>The AI Upload and Minisat Antechamber Turrets are to be kept on Non-Lethal in Code Green and Code Blue. The AI Core Turrets are to be kept on Lethal at all times. If a legal Law Change or Carding is occurring, the Turrets are to be disabled;</li>
|
||||
<li>If the AI Unit is not malfunctioning or subverted, any attempt at performing an illegal Carding or Law Change is to be responded to with non-lethal force. If the illegal attempts persist, and the perpetrator is demonstrably hostile, lethal force from Command/Security is permitted;</li>
|
||||
<li>Freeform Laws are only to be added if absolutely necessary due to external circumstances (such as major station emergencies). Adding unnecessary Freeform Laws is not permitted. Exception is made if the AI Unit and majority of Command agree to the Freeform Law that is proposed;</li>
|
||||
<li>Any use of the "Purge" Module is to be followed by the upload of a NanoTrasen-approved Lawset immediately. AI Units must be bound to a Lawset at all times.</li>
|
||||
</ol><BR>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -128,7 +128,6 @@
|
||||
materials = list()
|
||||
minor_fault = 1
|
||||
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/high/slime
|
||||
name = "charged slime core"
|
||||
desc = "A yellow slime core infused with plasma, it crackles with power."
|
||||
@@ -138,6 +137,12 @@
|
||||
materials = list()
|
||||
self_recharge = 1 // Infused slime cores self-recharge, over time
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/pulse //200 pulse shots
|
||||
name = "pulse rifle power cell"
|
||||
maxcharge = 40000
|
||||
rating = 3
|
||||
chargerate = 1500
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/pulse/carbine
|
||||
name = "pulse carbine power cell"
|
||||
maxcharge = 4000
|
||||
@@ -168,9 +173,3 @@
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/emproof/corrupt()
|
||||
return
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/temperaturegun
|
||||
name = "temperature gun cell"
|
||||
desc = "A specially designed power cell for heating and cooling projectiles"
|
||||
icon_state = "icell"
|
||||
maxcharge = 900
|
||||
@@ -131,7 +131,7 @@
|
||||
name = "nano-manipulator"
|
||||
desc = "A tiny little manipulator used in the construction of certain devices."
|
||||
icon_state = "nano_mani"
|
||||
origin_tech = "materials=3,programming=2"
|
||||
origin_tech = "materials=3;programming=2"
|
||||
rating = 2
|
||||
materials = list(MAT_METAL=30)
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
name = "pico-manipulator"
|
||||
desc = "A tiny little manipulator used in the construction of certain devices."
|
||||
icon_state = "pico_mani"
|
||||
origin_tech = "materials=5,programming=2"
|
||||
origin_tech = "materials=5;programming=2"
|
||||
rating = 3
|
||||
materials = list(MAT_METAL=30)
|
||||
|
||||
|
||||
@@ -6,8 +6,17 @@
|
||||
item_state = "utility"
|
||||
slot_flags = SLOT_BELT
|
||||
attack_verb = list("whipped", "lashed", "disciplined")
|
||||
var/use_item_overlays = 0 // Do we have overlays for items held inside the belt?
|
||||
|
||||
|
||||
/obj/item/weapon/storage/belt/update_icon()
|
||||
if(use_item_overlays)
|
||||
overlays.Cut()
|
||||
for(var/obj/item/I in contents)
|
||||
overlays += "[I.name]"
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/belt/proc/can_use()
|
||||
return is_equipped()
|
||||
|
||||
@@ -35,6 +44,7 @@
|
||||
desc = "Can hold various tools."
|
||||
icon_state = "utilitybelt"
|
||||
item_state = "utility"
|
||||
use_item_overlays = 1
|
||||
can_hold = list(
|
||||
"/obj/item/weapon/crowbar",
|
||||
"/obj/item/weapon/screwdriver",
|
||||
@@ -81,6 +91,7 @@
|
||||
desc = "Can hold various medical equipment."
|
||||
icon_state = "medicalbelt"
|
||||
item_state = "medical"
|
||||
use_item_overlays = 1
|
||||
can_hold = list(
|
||||
"/obj/item/device/healthanalyzer",
|
||||
"/obj/item/weapon/dnainjector",
|
||||
@@ -120,6 +131,7 @@
|
||||
desc = "Can hold various botanical supplies."
|
||||
icon_state = "botanybelt"
|
||||
item_state = "botany"
|
||||
use_item_overlays = 1
|
||||
can_hold = list(
|
||||
"/obj/item/device/analyzer/plant_analyzer",
|
||||
"/obj/item/weapon/minihoe",
|
||||
@@ -127,8 +139,8 @@
|
||||
"/obj/item/weapon/reagent_containers/glass/fertilizer",
|
||||
"/obj/item/weapon/reagent_containers/glass/bottle",
|
||||
"/obj/item/weapon/plantspray",
|
||||
"/obj/item/weapon/reagent_containers/syringe",
|
||||
"/obj/item/weapon/reagent_containers/glass/beaker",
|
||||
// "/obj/item/weapon/reagent_containers/syringe",
|
||||
// "/obj/item/weapon/reagent_containers/glass/beaker",
|
||||
"/obj/item/weapon/lighter/zippo",
|
||||
"/obj/item/weapon/storage/fancy/cigarettes",
|
||||
"obj/item/weapon/rollingpaperpack",
|
||||
@@ -148,6 +160,7 @@
|
||||
item_state = "security"//Could likely use a better one.
|
||||
storage_slots = 5
|
||||
max_w_class = 3
|
||||
use_item_overlays = 1
|
||||
can_hold = list(
|
||||
"/obj/item/weapon/grenade/flashbang",
|
||||
"/obj/item/weapon/grenade/chem_grenade/teargas",
|
||||
@@ -185,6 +198,7 @@
|
||||
icon_state = "soulstonebelt"
|
||||
item_state = "soulstonebelt"
|
||||
storage_slots = 6
|
||||
use_item_overlays = 1
|
||||
can_hold = list(
|
||||
"/obj/item/device/soulstone"
|
||||
)
|
||||
@@ -230,6 +244,7 @@
|
||||
item_state = "janibelt"
|
||||
storage_slots = 6
|
||||
max_w_class = 4 // Set to this so the light replacer can fit.
|
||||
use_item_overlays = 1
|
||||
can_hold = list(
|
||||
"/obj/item/weapon/grenade/chem_grenade/cleaner",
|
||||
"/obj/item/device/lightreplacer",
|
||||
@@ -300,6 +315,21 @@
|
||||
new /obj/item/ammo_casing/shotgun/beanbag(src)
|
||||
new /obj/item/ammo_casing/shotgun/beanbag(src)
|
||||
|
||||
/obj/item/weapon/storage/belt/bandolier/update_icon()
|
||||
..()
|
||||
icon_state = "[initial(icon_state)]_[contents.len]"
|
||||
|
||||
/obj/item/weapon/storage/belt/bandolier/attackby(obj/item/W, mob/user)
|
||||
var/amount = contents.len
|
||||
. = ..()
|
||||
if(amount != contents.len)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/storage/belt/lazabandolierrus/remove_from_storage(obj/item/W as obj, atom/new_location)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weapon/storage/belt/holster
|
||||
name = "shoulder holster"
|
||||
desc = "A holster to conceal a carried handgun. WARNING: Badasses only."
|
||||
@@ -318,6 +348,7 @@
|
||||
icon_state = "soulstonebelt"
|
||||
item_state = "soulstonebelt"
|
||||
storage_slots = 6
|
||||
use_item_overlays = 1
|
||||
can_hold = list(
|
||||
"/obj/item/weapon/gun/magic/wand"
|
||||
)
|
||||
|
||||
@@ -222,6 +222,10 @@
|
||||
icon_state = "dualsaber0"
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/attack(target as mob, mob/living/user as mob)
|
||||
if(HULK in user.mutations)
|
||||
to_chat(user, "<span class='warning'>You grip the blade too hard and accidentally close it!</span>")
|
||||
unwield()
|
||||
return
|
||||
..()
|
||||
if((CLUMSY in user.mutations) && (wielded) &&prob(40))
|
||||
to_chat(user, "\red You twirl around a bit before losing your balance and impaling yourself on the [src].")
|
||||
@@ -259,7 +263,10 @@
|
||||
if(wielded)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/wield()
|
||||
/obj/item/weapon/twohanded/dualsaber/wield(mob/living/carbon/M) //Specific wield () hulk checks due to reflection chance for balance issues and switches hitsounds.
|
||||
if(HULK in M.mutations)
|
||||
to_chat(M, "<span class='warning'>You lack the grace to wield this!</span>")
|
||||
return
|
||||
..()
|
||||
hitsound = 'sound/weapons/blade1.ogg'
|
||||
|
||||
|
||||
@@ -15,75 +15,6 @@
|
||||
to_chat(viewers(user), "<span class='suicide'>[user] is hitting \himself with the [src.name]! It looks like \he's trying to ban \himself from life.</span>")
|
||||
return (BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS)
|
||||
|
||||
/obj/item/weapon/nullrod
|
||||
name = "null rod"
|
||||
desc = "A rod of pure obsidian, its very presence disrupts and dampens the powers of paranormal phenomenae."
|
||||
icon_state = "nullrod"
|
||||
item_state = "nullrod"
|
||||
slot_flags = SLOT_BELT
|
||||
force = 15
|
||||
throw_speed = 1
|
||||
throw_range = 4
|
||||
throwforce = 10
|
||||
w_class = 1
|
||||
var/transformed = 0
|
||||
var/transform_into = /obj/item/weapon/nullrod/sword
|
||||
var/transform_via = list(/obj/item/clothing/suit/armor/riot/knight/templar, /obj/item/clothing/suit/chaplain_hoodie/fluff/chronx)
|
||||
|
||||
suicide_act(mob/user)
|
||||
to_chat(viewers(user), "<span class='suicide'>[user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide.</span>")
|
||||
return (BRUTELOSS|FIRELOSS)
|
||||
|
||||
/obj/item/weapon/nullrod/attack(mob/M as mob, mob/living/user as mob) //Paste from old-code to decult with a null rod.
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
|
||||
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.LAssailant = user
|
||||
|
||||
msg_admin_attack("[key_name_admin(user)] attacked [key_name_admin(M)] with [src.name] (INTENT: [uppertext(user.a_intent)])")
|
||||
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
to_chat(user, "\red The rod slips out of your hand and hits your head.")
|
||||
user.take_organ_damage(10)
|
||||
user.Paralyse(20)
|
||||
return
|
||||
|
||||
if(M.mind)
|
||||
if(M.mind.vampire)
|
||||
if(ishuman(M))
|
||||
if(!M.mind.vampire.get_ability(/datum/vampire_passive/full))
|
||||
to_chat(M, "<span class='warning'>The nullrod's power interferes with your own!</span>")
|
||||
M.mind.vampire.nullified = max(5, M.mind.vampire.nullified + 2)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/nullrod/afterattack(var/obj/item/I as obj, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
for(var/T in transform_via)
|
||||
if(istype(I, T)) //Only the Chaplain's holy armor is capable fo performing this feat.
|
||||
if(!transformed) // can't turn a sword into a sword.
|
||||
var/obj/item/S = new transform_into()
|
||||
to_chat(user, "<span class='notice'>You sheath the [src] into the [I]'s scabbard, transforming it into \a [S].</span>")
|
||||
user.unEquip(src)
|
||||
qdel(src)
|
||||
user.put_in_hands(S)
|
||||
break
|
||||
|
||||
/obj/item/weapon/nullrod/sword
|
||||
name = "holy sword"
|
||||
desc = "A sword imbued with holy power, its very presence disrupts and dampens the powers of paranormal phenomenae."
|
||||
icon_state = "claymore"
|
||||
item_state = "claymore"
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
w_class = 3 //transforming it is not without its downsides.
|
||||
sharp = 1
|
||||
edge = 1
|
||||
transformed = 1
|
||||
|
||||
/obj/item/weapon/sord
|
||||
name = "\improper SORD"
|
||||
desc = "This thing is so unspeakably shitty you are having a hard time even holding it."
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/weapon/storage/belt/security/sec(src)
|
||||
new /obj/item/taperoll/police(src)
|
||||
new /obj/item/weapon/gun/energy/hos(src)
|
||||
new /obj/item/weapon/gun/energy/gun/hos(src)
|
||||
new /obj/item/weapon/door_remote/head_of_security(src)
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
new /obj/item/weapon/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/weapon/gun/energy/advtaser(src)
|
||||
new /obj/item/weapon/gun/energy/gun/advtaser(src)
|
||||
new /obj/item/weapon/storage/belt/security/sec(src)
|
||||
new /obj/item/weapon/storage/box/holobadge(src)
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
if(!G.confirm())
|
||||
return 0
|
||||
G.affecting.forceMove(get_turf(src))
|
||||
G.affecting.Weaken(5)
|
||||
G.affecting.Weaken(2)
|
||||
G.affecting.visible_message("<span class='danger'>[G.assailant] pushes [G.affecting] onto [src].</span>", \
|
||||
"<span class='userdanger'>[G.assailant] pushes [G.affecting] onto [src].</span>")
|
||||
add_logs(G.affecting, G.assailant, "pushed onto a table")
|
||||
@@ -448,8 +448,9 @@
|
||||
/obj/structure/table/glass/destroy(dirty)
|
||||
if(dirty)
|
||||
new /obj/item/weapon/shard(loc)
|
||||
new /obj/item/weapon/shard(loc)
|
||||
else
|
||||
new /obj/item/stack/sheet/glass(loc)
|
||||
new /obj/item/stack/sheet/glass(loc, 2)
|
||||
..()
|
||||
|
||||
/obj/structure/table/glass/tablepush(obj/item/I, mob/user)
|
||||
|
||||
@@ -382,7 +382,7 @@ var/send_emergency_team
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest/ert/security(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/advtaser(M), slot_s_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun/advtaser(M), slot_s_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security/sunglasses(M), slot_glasses)
|
||||
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/ert/security(M), slot_in_backpack)
|
||||
@@ -459,7 +459,7 @@ var/send_emergency_team
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/security(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/advtaser(M), slot_s_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun/advtaser(M), slot_s_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security/sunglasses(M), slot_glasses)
|
||||
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/ert/security(M), slot_in_backpack)
|
||||
@@ -532,7 +532,7 @@ var/send_emergency_team
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle/pistol(M), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol(M), slot_in_backpack)
|
||||
|
||||
M.equip_to_slot_or_del(new /obj/item/device/t_scanner/extended_range(M), slot_l_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_r_store)
|
||||
@@ -553,7 +553,7 @@ var/send_emergency_team
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/flashbangs(M), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/ionrifle/carbine(M), slot_in_backpack)
|
||||
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle/carbine(M), slot_r_hand)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/carbine(M), slot_r_hand)
|
||||
|
||||
if("Medic")
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat/swat(M), slot_shoes)
|
||||
@@ -566,7 +566,7 @@ var/send_emergency_team
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/ert/medical(M), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer/swat(M), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/surgery(M), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle/pistol(M), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol(M), slot_in_backpack)
|
||||
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/combat/nanites(src), slot_l_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_r_store)
|
||||
@@ -585,7 +585,7 @@ var/send_emergency_team
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer/swat(M), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/restraints/handcuffs(M), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/lockbox/loyalty(M), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle/pistol(M), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol(M), slot_in_backpack)
|
||||
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/pinpointer(M), slot_l_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_r_store)
|
||||
@@ -610,4 +610,4 @@ var/send_emergency_team
|
||||
new /obj/item/device/radio/centcom( src )
|
||||
new /obj/item/weapon/reagent_containers/food/pill/salicylic( src )
|
||||
new /obj/item/weapon/reagent_containers/food/pill/patch/synthflesh( src )
|
||||
return
|
||||
return
|
||||
|
||||
+30
-14
@@ -9,8 +9,9 @@ var/list/jackboot_sound = list('sound/effects/jackboot1.ogg','sound/effects/jack
|
||||
var/list/swing_hit_sound = list('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg')
|
||||
var/list/hiss_sound = list('sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg')
|
||||
var/list/page_sound = list('sound/effects/pageturn1.ogg', 'sound/effects/pageturn2.ogg','sound/effects/pageturn3.ogg')
|
||||
//var/list/gun_sound = list('sound/weapons/Gunshot.ogg', 'sound/weapons/Gunshot2.ogg','sound/weapons/Gunshot3.ogg','sound/weapons/Gunshot4.ogg')
|
||||
var/list/gun_sound = list('sound/weapons/Gunshot.ogg', 'sound/weapons/Gunshot2.ogg','sound/weapons/Gunshot3.ogg','sound/weapons/Gunshot4.ogg')
|
||||
var/list/computer_ambience = list('sound/goonstation/machines/ambicomp1.ogg', 'sound/goonstation/machines/ambicomp2.ogg', 'sound/goonstation/machines/ambicomp3.ogg')
|
||||
var/list/ricochet = list('sound/weapons/effects/ric1.ogg', 'sound/weapons/effects/ric2.ogg','sound/weapons/effects/ric3.ogg','sound/weapons/effects/ric4.ogg','sound/weapons/effects/ric5.ogg')
|
||||
|
||||
/proc/playsound(var/atom/source, soundin, vol as num, vary, extrarange as num, falloff, var/is_global, var/pitch)
|
||||
|
||||
@@ -107,17 +108,32 @@ var/const/FALLOFF_SOUNDS = 0.5
|
||||
/proc/get_sfx(soundin)
|
||||
if(istext(soundin))
|
||||
switch(soundin)
|
||||
if ("shatter") soundin = pick(shatter_sound)
|
||||
if ("explosion") soundin = pick(explosion_sound)
|
||||
if ("sparks") soundin = pick(spark_sound)
|
||||
if ("rustle") soundin = pick(rustle_sound)
|
||||
if ("bodyfall") soundin = pick(bodyfall_sound)
|
||||
if ("punch") soundin = pick(punch_sound)
|
||||
if ("clownstep") soundin = pick(clown_sound)
|
||||
if ("jackboot") soundin = pick(jackboot_sound)
|
||||
if ("swing_hit") soundin = pick(swing_hit_sound)
|
||||
if ("hiss") soundin = pick(hiss_sound)
|
||||
if ("pageturn") soundin = pick(page_sound)
|
||||
//if ("gunshot") soundin = pick(gun_sound)
|
||||
if("computer_ambience") soundin = pick(computer_ambience)
|
||||
if ("shatter")
|
||||
soundin = pick(shatter_sound)
|
||||
if ("explosion")
|
||||
soundin = pick(explosion_sound)
|
||||
if ("sparks")
|
||||
soundin = pick(spark_sound)
|
||||
if ("rustle")
|
||||
soundin = pick(rustle_sound)
|
||||
if ("bodyfall")
|
||||
soundin = pick(bodyfall_sound)
|
||||
if ("punch")
|
||||
soundin = pick(punch_sound)
|
||||
if ("clownstep")
|
||||
soundin = pick(clown_sound)
|
||||
if ("jackboot")
|
||||
soundin = pick(jackboot_sound)
|
||||
if ("swing_hit")
|
||||
soundin = pick(swing_hit_sound)
|
||||
if ("hiss")
|
||||
soundin = pick(hiss_sound)
|
||||
if ("pageturn")
|
||||
soundin = pick(page_sound)
|
||||
if ("gunshot")
|
||||
soundin = pick(gun_sound)
|
||||
if("computer_ambience")
|
||||
soundin = pick(computer_ambience)
|
||||
if("ricochet")
|
||||
soundin = pick(ricochet)
|
||||
return soundin
|
||||
|
||||
@@ -1,225 +0,0 @@
|
||||
/obj/structure/spacepod_frame
|
||||
density = 1
|
||||
opacity = 0
|
||||
|
||||
anchored = 1
|
||||
layer = 3.9
|
||||
|
||||
icon = 'icons/goonstation/48x48/pod_construction.dmi'
|
||||
icon_state = "pod_1"
|
||||
|
||||
var/datum/construction/construct
|
||||
|
||||
/obj/structure/spacepod_frame/New()
|
||||
..()
|
||||
bound_width = 64
|
||||
bound_height = 64
|
||||
|
||||
construct = new /datum/construction/reversible2/pod(src)
|
||||
|
||||
dir = EAST
|
||||
|
||||
/obj/structure/spacepod_frame/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(!construct || !construct.action(W, user))
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/spacepod_frame/attack_hand()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////
|
||||
// CONSTRUCTION STEPS
|
||||
/////////////////////////////////
|
||||
/datum/construction/reversible2/pod
|
||||
result = /obj/spacepod/civilian
|
||||
base_icon="pod"
|
||||
//taskpath = /datum/job_objective/make_pod
|
||||
steps = list(
|
||||
// 1. Initial state
|
||||
list(
|
||||
"desc" = "An empty pod frame.",
|
||||
state_next = list(
|
||||
"key" = /obj/item/stack/cable_coil,
|
||||
"vis_msg" = "{USER} wires the {HOLDER}.",
|
||||
"self_msg" = "You wire the {HOLDER}."
|
||||
)
|
||||
),
|
||||
// 2. Crudely Wired
|
||||
list(
|
||||
"desc" = "A crudely-wired pod frame.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/wirecutters,
|
||||
"vis_msg" = "{USER} cuts out the {HOLDER}'s wiring.",
|
||||
"self_msg" = "You remove the {HOLDER}'s wiring."
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/weapon/screwdriver,
|
||||
"vis_msg" = "{USER} adjusts the wiring.",
|
||||
"self_msg" = "You adjust the {HOLDER}'s wiring."
|
||||
)
|
||||
),
|
||||
// 3. Cleanly wired
|
||||
list(
|
||||
"desc" = "A wired pod frame.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/screwdriver,
|
||||
"vis_msg" = "{USER} unclips {HOLDER}'s wiring harnesses.",
|
||||
"self_msg" = "You unclip {HOLDER}'s wiring harnesses."
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/weapon/circuitboard/mecha/pod,
|
||||
"vis_msg" = "{USER} inserts the mainboard into the {HOLDER}.",
|
||||
"self_msg" = "You insert the mainboard into the {HOLDER}.",
|
||||
"delete" = 1
|
||||
)
|
||||
),
|
||||
// 4. Circuit added
|
||||
list(
|
||||
"desc" = "A wired pod frame with a loose mainboard.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/crowbar,
|
||||
"vis_msg" = "{USER} pries out the mainboard.",
|
||||
"self_msg" = "You pry out the mainboard.",
|
||||
|
||||
"spawn" = /obj/item/weapon/circuitboard/mecha/pod,
|
||||
"amount" = 1
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/weapon/screwdriver,
|
||||
"vis_msg" = "{USER} secures the mainboard.",
|
||||
"self_msg" = "You secure the mainboard."
|
||||
)
|
||||
),
|
||||
// 5. Circuit secured
|
||||
list(
|
||||
"desc" = "A wired pod frame with a secured mainboard.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/screwdriver,
|
||||
"vis_msg" = "{USER} unsecures the mainboard.",
|
||||
"self_msg" = "You unscrew the mainboard from the {HOLDER}."
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/pod_parts/core,
|
||||
,
|
||||
"vis_msg" = "{USER} inserts the core into the {HOLDER}.",
|
||||
"self_msg" = "You carefully insert the core into the {HOLDER}.",
|
||||
"delete" = 1
|
||||
)
|
||||
),
|
||||
// 6. Core inserted
|
||||
list(
|
||||
"desc" = "A naked space pod with a loose core.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/crowbar,
|
||||
"vis_msg" = "{USER} delicately removes the core from the {HOLDER} with a crowbar.",
|
||||
"self_msg" = "You delicately remove the core from the {HOLDER} with a crowbar.",
|
||||
|
||||
"spawn" = /obj/item/pod_parts/core,
|
||||
"amount" = 1
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/weapon/wrench,
|
||||
"vis_msg" = "{USER} secures the core's bolts.",
|
||||
"self_msg" = "You secure the core's bolts."
|
||||
)
|
||||
),
|
||||
// 7. Core secured
|
||||
list(
|
||||
"desc" = "A naked space pod with an exposed core. How lewd.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/wrench,
|
||||
"vis_msg" = "{USER} unsecures the {HOLDER}'s core.",
|
||||
"self_msg" = "You unsecure the {HOLDER}'s core."
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/stack/sheet/metal,
|
||||
"amount" = 5,
|
||||
"vis_msg" = "{USER} frabricates a pressure bulkhead for the {HOLDER}.",
|
||||
"self_msg" = "You frabricate a pressure bulkhead for the {HOLDER}."
|
||||
)
|
||||
),
|
||||
// 8. Bulkhead added
|
||||
list(
|
||||
"desc" = "A space pod with loose bulkhead panelling exposed.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/crowbar,
|
||||
"vis_msg" = "{USER} pops the {HOLDER}'s bulkhead panelling loose.",
|
||||
"self_msg" = "You pop the {HOLDER}'s bulkhead panelling loose.",
|
||||
|
||||
"spawn" = /obj/item/stack/sheet/metal,
|
||||
"amount" = 5,
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/weapon/wrench,
|
||||
"vis_msg" = "{USER} secures the {HOLDER}'s bulkhead panelling.",
|
||||
"self_msg" = "You secure the {HOLDER}'s bulkhead panelling."
|
||||
)
|
||||
),
|
||||
// 9. Bulkhead secured with bolts
|
||||
list(
|
||||
"desc" = "A space pod with unwelded bulkhead panelling exposed.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/wrench,
|
||||
"vis_msg" = "{USER} unbolts the {HOLDER}'s bulkhead panelling.",
|
||||
"self_msg" = "You unbolt the {HOLDER}'s bulkhead panelling."
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/weapon/weldingtool,
|
||||
"vis_msg" = "{USER} seals the {HOLDER}'s bulkhead panelling with a weld.",
|
||||
"self_msg" = "You seal the {HOLDER}'s bulkhead panelling with a weld."
|
||||
)
|
||||
),
|
||||
// 10. Welded bulkhead
|
||||
list(
|
||||
"desc" = "A space pod with sealed bulkhead panelling exposed.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/weldingtool,
|
||||
"vis_msg" = "{USER} cuts the {HOLDER}'s bulkhead panelling loose.",
|
||||
"self_msg" = "You cut the {HOLDER}'s bulkhead panelling loose."
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/pod_parts/armor,
|
||||
"vis_msg" = "{USER} installs the {HOLDER}'s armor plating.",
|
||||
"self_msg" = "You install the {HOLDER}'s armor plating.",
|
||||
"delete" = 1
|
||||
)
|
||||
),
|
||||
// 11. Loose armor
|
||||
list(
|
||||
"desc" = "A space pod with unsecured armor.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/crowbar,
|
||||
"vis_msg" = "{USER} pries off {HOLDER}'s armor.",
|
||||
"self_msg" = "You pry off {HOLDER}'s armor.",
|
||||
"spawn" = /obj/item/pod_parts/armor,
|
||||
"amount" = 1
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/weapon/wrench,
|
||||
"vis_msg" = "{USER} bolts down the {HOLDER}'s armor.",
|
||||
"self_msg" = "You bolt down the {HOLDER}'s armor."
|
||||
)
|
||||
),
|
||||
// 12. Bolted-down armor
|
||||
list(
|
||||
"desc" = "A space pod with unsecured armor.",
|
||||
state_prev = list(
|
||||
"key" = /obj/item/weapon/wrench,
|
||||
"vis_msg" = "{USER} unsecures the {HOLDER}'s armor.",
|
||||
"self_msg" = "You unsecure the {HOLDER}'s armor."
|
||||
),
|
||||
state_next = list(
|
||||
"key" = /obj/item/weapon/weldingtool,
|
||||
"vis_msg" = "{USER} welds the {HOLDER}'s armor.",
|
||||
"self_msg" = "You weld the {HOLDER}'s armor."
|
||||
)
|
||||
)
|
||||
// EOF
|
||||
)
|
||||
|
||||
spawn_result(mob/user as mob)
|
||||
..()
|
||||
feedback_inc("spacepod_created",1)
|
||||
return
|
||||
@@ -1,232 +0,0 @@
|
||||
/obj/item/device/spacepod_equipment/weaponry/proc/fire_weapons()
|
||||
if(my_atom.next_firetime > world.time)
|
||||
to_chat(usr, "<span class='warning'>Your weapons are recharging.</span>")
|
||||
return
|
||||
var/turf/firstloc
|
||||
var/turf/secondloc
|
||||
if(!my_atom.equipment_system || !my_atom.equipment_system.weapon_system)
|
||||
to_chat(usr, "<span class='warning'>Missing equipment or weapons.</span>")
|
||||
my_atom.verbs -= text2path("[type]/proc/fire_weapons")
|
||||
return
|
||||
my_atom.battery.use(shot_cost)
|
||||
var/olddir
|
||||
for(var/i = 0; i < shots_per; i++)
|
||||
if(olddir != my_atom.dir)
|
||||
switch(my_atom.dir)
|
||||
if(NORTH)
|
||||
firstloc = get_step(my_atom, NORTH)
|
||||
secondloc = get_step(firstloc,EAST)
|
||||
if(SOUTH)
|
||||
firstloc = get_turf(my_atom)
|
||||
secondloc = get_step(firstloc,EAST)
|
||||
if(EAST)
|
||||
firstloc = get_step(my_atom, EAST)
|
||||
secondloc = get_step(firstloc,NORTH)
|
||||
if(WEST)
|
||||
firstloc = get_turf(my_atom)
|
||||
secondloc = get_step(firstloc,NORTH)
|
||||
olddir = dir
|
||||
var/proj_type = text2path(projectile_type)
|
||||
var/obj/item/projectile/projone = new proj_type(firstloc)
|
||||
var/obj/item/projectile/projtwo = new proj_type(secondloc)
|
||||
projone.starting = get_turf(my_atom)
|
||||
projone.shot_from = src
|
||||
projone.firer = usr
|
||||
projone.def_zone = "chest"
|
||||
projtwo.starting = get_turf(my_atom)
|
||||
projtwo.shot_from = src
|
||||
projtwo.firer = usr
|
||||
projtwo.def_zone = "chest"
|
||||
spawn()
|
||||
playsound(src, fire_sound, 50, 1)
|
||||
projone.dumbfire(my_atom.dir)
|
||||
projtwo.dumbfire(my_atom.dir)
|
||||
sleep(2)
|
||||
my_atom.next_firetime = world.time + fire_delay
|
||||
|
||||
/datum/spacepod/equipment
|
||||
var/obj/spacepod/my_atom
|
||||
var/obj/item/device/spacepod_equipment/weaponry/weapon_system // weapons system
|
||||
var/obj/item/device/spacepod_equipment/misc/misc_system // misc system
|
||||
var/obj/item/device/spacepod_equipment/cargo/cargo_system // cargo system
|
||||
var/obj/item/device/spacepod_equipment/lock/lock_system // lock system
|
||||
//var/obj/item/device/spacepod_equipment/engine/engine_system // engine system
|
||||
//var/obj/item/device/spacepod_equipment/shield/shield_system // shielding system
|
||||
|
||||
/datum/spacepod/equipment/New(var/obj/spacepod/SP)
|
||||
..()
|
||||
if(istype(SP))
|
||||
my_atom = SP
|
||||
|
||||
/obj/item/device/spacepod_equipment
|
||||
name = "equipment"
|
||||
var/obj/spacepod/my_atom
|
||||
|
||||
/obj/item/device/spacepod_equipment/proc/removed(var/mob/user) // So that you can unload cargo when you remove the module
|
||||
return
|
||||
|
||||
// base item for spacepod weapons
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry
|
||||
name = "pod weapon"
|
||||
desc = "You shouldn't be seeing this"
|
||||
icon = 'icons/vehicles/spacepod.dmi'
|
||||
icon_state = "blank"
|
||||
var/projectile_type
|
||||
var/shot_cost = 0
|
||||
var/shots_per = 1
|
||||
var/fire_sound
|
||||
var/fire_delay = 15
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/taser
|
||||
name = "disabler system"
|
||||
desc = "A weak taser system for space pods, fires disabler beams."
|
||||
icon_state = "weapon_taser"
|
||||
projectile_type = "/obj/item/projectile/beam/disabler"
|
||||
shot_cost = 400
|
||||
fire_sound = "sound/weapons/Taser.ogg"
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/burst_taser
|
||||
name = "burst taser system"
|
||||
desc = "A weak taser system for space pods, this one fires 3 at a time."
|
||||
icon_state = "weapon_burst_taser"
|
||||
projectile_type = "/obj/item/projectile/beam/disabler"
|
||||
shot_cost = 1200
|
||||
shots_per = 3
|
||||
fire_sound = "sound/weapons/Taser.ogg"
|
||||
fire_delay = 30
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/laser
|
||||
name = "laser system"
|
||||
desc = "A weak laser system for space pods, fires concentrated bursts of energy"
|
||||
icon_state = "weapon_laser"
|
||||
projectile_type = "/obj/item/projectile/beam"
|
||||
shot_cost = 600
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
|
||||
// MINING LASERS
|
||||
/obj/item/device/spacepod_equipment/weaponry/mining_laser_basic
|
||||
name = "weak mining laser system"
|
||||
desc = "A weak mining laser system for space pods, fires bursts of energy that cut through rock"
|
||||
icon = 'icons/goonstation/pods/ship.dmi'
|
||||
icon_state = "pod_taser"
|
||||
projectile_type = "/obj/item/projectile/kinetic"
|
||||
shot_cost = 300
|
||||
fire_delay = 14
|
||||
fire_sound = 'sound/weapons/Kenetic_accel.ogg'
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/mining_laser
|
||||
name = "mining laser system"
|
||||
desc = "A mining laser system for space pods, fires bursts of energy that cut through rock"
|
||||
icon = 'icons/goonstation/pods/ship.dmi'
|
||||
icon_state = "pod_m_laser"
|
||||
projectile_type = "/obj/item/projectile/kinetic/super"
|
||||
shot_cost = 250
|
||||
fire_delay = 10
|
||||
fire_sound = 'sound/weapons/Kenetic_accel.ogg'
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/mining_laser_hyper
|
||||
name = "enhanced mining laser system"
|
||||
desc = "An enhanced mining laser system for space pods, fires bursts of energy that cut through rock"
|
||||
icon = 'icons/goonstation/pods/ship.dmi'
|
||||
icon_state = "pod_w_laser"
|
||||
projectile_type = "/obj/item/projectile/kinetic/hyper"
|
||||
shot_cost = 200
|
||||
fire_delay = 8
|
||||
fire_sound = 'sound/weapons/Kenetic_accel.ogg'
|
||||
|
||||
//base item for spacepod misc equipment (tracker)
|
||||
/obj/item/device/spacepod_equipment/misc
|
||||
name = "pod misc"
|
||||
desc = "You shouldn't be seeing this"
|
||||
icon = 'icons/goonstation/pods/ship.dmi'
|
||||
icon_state = "blank"
|
||||
var/enabled
|
||||
|
||||
/obj/item/device/spacepod_equipment/misc/tracker
|
||||
name = "\improper spacepod tracking system"
|
||||
desc = "A tracking device for spacepods."
|
||||
icon_state = "pod_locator"
|
||||
enabled = 0
|
||||
|
||||
/obj/item/device/spacepod_equipment/misc/tracker/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(isscrewdriver(I))
|
||||
if(enabled)
|
||||
enabled = 0
|
||||
user.show_message("<span class='notice'>You disable \the [src]'s power.")
|
||||
return
|
||||
enabled = 1
|
||||
user.show_message("<span class='notice'>You enable \the [src]'s power.</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/device/spacepod_equipment/cargo
|
||||
name = "pod cargo"
|
||||
desc = "You shouldn't be seeing this"
|
||||
icon = 'icons/vehicles/spacepod.dmi'
|
||||
icon_state = "blank"
|
||||
|
||||
/obj/item/device/spacepod_equipment/cargo/proc/passover(var/obj/item/I)
|
||||
return
|
||||
|
||||
/obj/item/device/spacepod_equipment/cargo/proc/unload()
|
||||
return
|
||||
|
||||
/obj/item/device/spacepod_equipment/cargo/ore
|
||||
name = "\improper spacepod ore storage system"
|
||||
desc = "An ore storage system for spacepods. Scoops up any ore you drive over."
|
||||
icon_state = "cargo_ore"
|
||||
var/obj/structure/ore_box/box
|
||||
|
||||
/obj/item/device/spacepod_equipment/cargo/ore/passover(var/obj/item/I)
|
||||
if(box && istype(I,/obj/item/weapon/ore))
|
||||
I.forceMove(box)
|
||||
|
||||
/obj/item/device/spacepod_equipment/cargo/ore/unload()
|
||||
if(box)
|
||||
box.forceMove(get_turf(my_atom))
|
||||
box = null
|
||||
|
||||
/obj/item/device/spacepod_equipment/cargo/ore/removed(var/mob/user)
|
||||
. = ..()
|
||||
unload()
|
||||
|
||||
/obj/item/device/spacepod_equipment/lock
|
||||
name = "pod lock"
|
||||
desc = "You shouldn't be seeing this"
|
||||
icon = 'icons/vehicles/spacepod.dmi'
|
||||
icon_state = "blank"
|
||||
var/mode = 0
|
||||
var/id = null
|
||||
|
||||
// Key and Tumbler System
|
||||
/obj/item/device/spacepod_equipment/lock/keyed
|
||||
name = "spacepod tumbler lock"
|
||||
desc = "A locking system to stop podjacking. This version uses a standalone key."
|
||||
icon_state = "lock_tumbler"
|
||||
var/static/id_source = 0
|
||||
|
||||
/obj/item/device/spacepod_equipment/lock/keyed/New()
|
||||
..()
|
||||
id = ++id_source
|
||||
|
||||
// The key
|
||||
/obj/item/device/spacepod_key
|
||||
name = "spacepod key"
|
||||
desc = "A key for a spacepod lock."
|
||||
icon = 'icons/vehicles/spacepod.dmi'
|
||||
icon_state = "podkey"
|
||||
w_class = 1.0
|
||||
var/id = 0
|
||||
|
||||
// Key - Lock Interactions
|
||||
/obj/item/device/spacepod_equipment/lock/keyed/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/device/spacepod_key))
|
||||
var/obj/item/device/spacepod_key/key = I
|
||||
if(!key.id)
|
||||
key.id = id
|
||||
to_chat(user, "<span class='notice'>You grind the blank key to fit the lock.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>This key is already ground!</span>")
|
||||
else
|
||||
..()
|
||||
@@ -1,125 +0,0 @@
|
||||
/obj/item/pod_parts
|
||||
parent_type = /obj/item/mecha_parts
|
||||
icon = 'icons/goonstation/pods/pod_parts.dmi'
|
||||
|
||||
/obj/item/pod_parts/core
|
||||
name="Space Pod Core"
|
||||
icon_state = "core"
|
||||
flags = CONDUCT
|
||||
origin_tech = "programming=2;materials=3;bluespace=2;engineering=3"
|
||||
|
||||
/obj/item/pod_parts/pod_frame
|
||||
name = "Space Pod Frame"
|
||||
icon_state = ""
|
||||
flags = CONDUCT
|
||||
density = 0
|
||||
anchored = 0
|
||||
var/link_to = null
|
||||
var/link_angle = 0
|
||||
|
||||
/obj/item/pod_parts/pod_frame/proc/find_square()
|
||||
/*
|
||||
each part, in essence, stores the relative position of another part
|
||||
you can find where this part should be by looking at the current direction of the current part and applying the link_angle
|
||||
the link_angle is the angle between the part's direction and its following part, which is the current part's link_to
|
||||
the code works by going in a loop - each part is capable of starting a loop by checking for the part after it, and that part checking, and so on
|
||||
this 4-part loop, starting from any part of the frame, can determine if all the parts are properly in place and aligned
|
||||
it also checks that each part is unique, and that all the parts are there for the spacepod itself
|
||||
*/
|
||||
var/neededparts = list(/obj/item/pod_parts/pod_frame/aft_port, /obj/item/pod_parts/pod_frame/aft_starboard, /obj/item/pod_parts/pod_frame/fore_port, /obj/item/pod_parts/pod_frame/fore_starboard)
|
||||
var/turf/T
|
||||
var/obj/item/pod_parts/pod_frame/linked
|
||||
var/obj/item/pod_parts/pod_frame/pointer
|
||||
var/connectedparts = list()
|
||||
neededparts -= src
|
||||
//log_admin("Starting with [src]")
|
||||
linked = src
|
||||
for(var/i = 1; i <= 4; i++)
|
||||
T = get_turf(get_step(linked, turn(linked.dir, -linked.link_angle))) //get the next place that we want to look at
|
||||
if(locate(linked.link_to) in T)
|
||||
pointer = locate(linked.link_to) in T
|
||||
//log_admin("Looking at [pointer.type]")
|
||||
if(istype(pointer, linked.link_to) && pointer.dir == linked.dir && pointer.anchored)
|
||||
if(!(pointer in connectedparts))
|
||||
connectedparts += pointer
|
||||
linked = pointer
|
||||
pointer = null
|
||||
//log_admin("Parts left: [neededparts.len]") //len not working
|
||||
for(var/i = 1; i <=4; i++)
|
||||
var/obj/item/pod_parts/pod_frame/F = connectedparts[i]
|
||||
if(F.type in neededparts) //if one of the items can be founded in neededparts
|
||||
neededparts -= F.type
|
||||
log_admin("Found [F.type]")
|
||||
else //because neededparts has 4 distinct items, this must be called if theyre not all in place and wrenched
|
||||
return 0
|
||||
return connectedparts
|
||||
|
||||
/obj/item/pod_parts/pod_frame/attackby(var/obj/O, mob/user)
|
||||
if(istype(O, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = O
|
||||
var/list/linkedparts = find_square()
|
||||
if(!linkedparts)
|
||||
to_chat(user, "<span class='rose'>You cannot assemble a pod frame because you do not have the necessary assembly.</span>")
|
||||
return
|
||||
var/obj/structure/spacepod_frame/pod = new /obj/structure/spacepod_frame(src.loc)
|
||||
pod.dir = src.dir
|
||||
to_chat(user, "<span class='notice'>You strut the pod frame together.</span>")
|
||||
R.use(10)
|
||||
for(var/obj/item/pod_parts/pod_frame/F in linkedparts)
|
||||
if(1 == turn(F.dir, -F.link_angle)) //if the part links north during construction, as the bottom left part always does
|
||||
//log_admin("Repositioning")
|
||||
pod.loc = F.loc
|
||||
qdel(F)
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
to_chat(user, "<span class='notice'>You [!anchored ? "secure \the [src] in place." : "remove the securing bolts."]</span>")
|
||||
anchored = !anchored
|
||||
density = anchored
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
|
||||
/obj/item/pod_parts/pod_frame/verb/rotate()
|
||||
set name = "Rotate Frame"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
if(anchored)
|
||||
to_chat(usr, "\The [src] is securely bolted!")
|
||||
return 0
|
||||
src.dir = turn(src.dir, -90)
|
||||
return 1
|
||||
|
||||
/obj/item/pod_parts/pod_frame/attack_hand()
|
||||
src.rotate()
|
||||
|
||||
/obj/item/pod_parts/pod_frame/fore_port
|
||||
name = "fore port pod frame"
|
||||
icon_state = "pod_fp"
|
||||
desc = "A space pod frame component. This is the fore port component."
|
||||
link_to = /obj/item/pod_parts/pod_frame/fore_starboard
|
||||
link_angle = 90
|
||||
|
||||
/obj/item/pod_parts/pod_frame/fore_starboard
|
||||
name = "fore starboard pod frame"
|
||||
icon_state = "pod_fs"
|
||||
desc = "A space pod frame component. This is the fore starboard component."
|
||||
link_to = /obj/item/pod_parts/pod_frame/aft_starboard
|
||||
link_angle = 180
|
||||
|
||||
/obj/item/pod_parts/pod_frame/aft_port
|
||||
name = "aft port pod frame"
|
||||
icon_state = "pod_ap"
|
||||
desc = "A space pod frame component. This is the aft port component."
|
||||
link_to = /obj/item/pod_parts/pod_frame/fore_port
|
||||
link_angle = 0
|
||||
|
||||
/obj/item/pod_parts/pod_frame/aft_starboard
|
||||
name = "aft starboard pod frame"
|
||||
icon_state = "pod_as"
|
||||
desc = "A space pod frame component. This is the aft starboard component."
|
||||
link_to = /obj/item/pod_parts/pod_frame/aft_port
|
||||
link_angle = 270
|
||||
|
||||
/obj/item/pod_parts/armor
|
||||
name = "civilian pod armor"
|
||||
icon = 'icons/goonstation/pods/pod_parts.dmi'
|
||||
icon_state = "pod_armor_civ"
|
||||
desc = "Spacepod armor. This is the civilian version. It looks rather flimsy."
|
||||
@@ -1,550 +0,0 @@
|
||||
/obj/machinery/spod_part_fabricator
|
||||
icon = 'icons/obj/robotics.dmi'
|
||||
icon_state = "fab-idle"
|
||||
name = "spacepod fabricator"
|
||||
desc = "Nothing is being built."
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 20
|
||||
active_power_usage = 5000
|
||||
var/time_coeff = 1
|
||||
var/resource_coeff = 1
|
||||
var/time_coeff_tech = 1
|
||||
var/resource_coeff_tech = 1
|
||||
var/list/resources = list(
|
||||
MAT_METAL=0,
|
||||
MAT_GLASS=0,
|
||||
MAT_BANANIUM=0,
|
||||
MAT_DIAMOND=0,
|
||||
MAT_GOLD=0,
|
||||
MAT_PLASMA=0,
|
||||
MAT_SILVER=0,
|
||||
MAT_URANIUM=0
|
||||
)
|
||||
var/res_max_amount = 200000
|
||||
var/datum/research/files
|
||||
var/id
|
||||
var/sync = 0
|
||||
var/part_set
|
||||
var/datum/design/being_built
|
||||
var/list/queue = list()
|
||||
var/processing_queue = 0
|
||||
var/screen = "main"
|
||||
var/temp
|
||||
var/list/part_sets = list(
|
||||
"Pod_Weaponry",
|
||||
"Pod_Armor",
|
||||
"Pod_Parts",
|
||||
"Pod_Frame",
|
||||
"Misc",
|
||||
)
|
||||
var/turf/exit
|
||||
|
||||
/obj/machinery/spod_part_fabricator/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/podfab(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
RefreshParts()
|
||||
|
||||
files = new /datum/research(src) //Setup the research data holder.
|
||||
for(var/direction in cardinal)
|
||||
exit = get_step(src,direction)
|
||||
if(!exit.density)
|
||||
break
|
||||
exit = loc
|
||||
|
||||
/obj/machinery/spod_part_fabricator/upgraded/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/podfab(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser/ultra(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser/ultra(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/spod_part_fabricator/RefreshParts()
|
||||
var/T = 0
|
||||
|
||||
//maximum stocking amount (max 412000)
|
||||
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
|
||||
T += M.rating
|
||||
res_max_amount = (187000+(T * 37500))
|
||||
|
||||
//ressources adjustment coefficient (1 -> 0.88 -> 0.75)
|
||||
T = -1
|
||||
for(var/obj/item/weapon/stock_parts/micro_laser/Ma in component_parts)
|
||||
T += Ma.rating
|
||||
resource_coeff = round(initial(resource_coeff) - (initial(resource_coeff)*(T))/8,0.01)
|
||||
|
||||
//building time adjustment coefficient (1 -> 0.8 -> 0.6)
|
||||
T = -1
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/Ml in component_parts)
|
||||
T += Ml.rating
|
||||
time_coeff = round(initial(time_coeff) - (initial(time_coeff)*(T))/5,0.01)
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/output_parts_list(set_name)
|
||||
var/output = ""
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.build_type & PODFAB)
|
||||
if(!(set_name in D.category))
|
||||
continue
|
||||
var/resources_available = check_resources(D)
|
||||
output += "<div class='part'>[output_part_info(D)]<br>\[[resources_available?"<a href='?src=\ref[src];part=[D.id]'>Build</a> | ":null]<a href='?src=\ref[src];add_to_queue=[D.id]'>Add to queue</a>\]\[<a href='?src=\ref[src];part_desc=[D.id]'>?</a>\]</div>"
|
||||
return output
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/output_part_info(datum/design/D)
|
||||
var/output = "[initial(D.name)] (Cost: [output_part_cost(D)]) [get_construction_time_w_coeff(D)/10] seconds"
|
||||
return output
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/output_part_cost(datum/design/D)
|
||||
var/i = 0
|
||||
var/output
|
||||
for(var/c in D.materials)
|
||||
if(c in resources)
|
||||
output += "[i?" | ":null][get_resource_cost_w_coeff(D,c)] [material2name(c)]"
|
||||
i++
|
||||
return output
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/output_available_resources()
|
||||
var/output
|
||||
for(var/resource in resources)
|
||||
var/amount = min(res_max_amount, resources[resource])
|
||||
output += "<span class=\"res_name\">[material2name(resource)]: </span>[amount] cm³, [round(resources[resource] / MINERAL_MATERIAL_AMOUNT,0.1)] sheets"
|
||||
if(amount>0)
|
||||
output += "<span style='font-size:80%;'> - Remove \[<a href='?src=\ref[src];remove_mat=1;material=[resource]'>1</a>\] | \[<a href='?src=\ref[src];remove_mat=10;material=[resource]'>10</a>\] | \[<a href='?src=\ref[src];remove_mat=1;material=[resource];custom_eject=1'>Custom</a>\] | \[<a href='?src=\ref[src];remove_mat=[resources[resource] / MINERAL_MATERIAL_AMOUNT];material=[resource]'>All</a>\]</span>"
|
||||
output += "<br/>"
|
||||
return output
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/remove_resources(datum/design/D)
|
||||
for(var/resource in D.materials)
|
||||
if(resource in resources)
|
||||
resources[resource] -= get_resource_cost_w_coeff(D,resource)
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/check_resources(datum/design/D)
|
||||
for(var/R in D.materials)
|
||||
if(R in resources)
|
||||
if(resources[R] < get_resource_cost_w_coeff(D, R))
|
||||
return 0
|
||||
else
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/build_part(datum/design/D)
|
||||
being_built = D
|
||||
desc = "It's building \a [initial(D.name)]."
|
||||
remove_resources(D)
|
||||
overlays += "fab-active"
|
||||
use_power = 2
|
||||
updateUsrDialog()
|
||||
sleep(get_construction_time_w_coeff(D))
|
||||
use_power = 1
|
||||
overlays -= "fab-active"
|
||||
desc = initial(desc)
|
||||
|
||||
var/obj/item/I = new D.build_path
|
||||
var/O = D.locked
|
||||
if(O)
|
||||
var/obj/item/weapon/storage/lockbox/L = new/obj/item/weapon/storage/lockbox(exit)
|
||||
I.loc = L
|
||||
L.name += " ([I.name])"
|
||||
else
|
||||
I.loc = exit
|
||||
I.materials[MAT_METAL] = get_resource_cost_w_coeff(D,MAT_METAL)
|
||||
I.materials[MAT_GLASS] = get_resource_cost_w_coeff(D,MAT_GLASS)
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps, \"\The [I] is complete.\"")
|
||||
being_built = null
|
||||
|
||||
updateUsrDialog()
|
||||
return 1
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/update_queue_on_page()
|
||||
send_byjax(usr,"mecha_fabricator.browser","queue",list_queue())
|
||||
return
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/add_part_set_to_queue(set_name)
|
||||
if(set_name in part_sets)
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.build_type & PODFAB)
|
||||
if(set_name in D.category)
|
||||
add_to_queue(D)
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/add_to_queue(D)
|
||||
if(!istype(queue))
|
||||
queue = list()
|
||||
if(D)
|
||||
queue[++queue.len] = D
|
||||
return queue.len
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/remove_from_queue(index)
|
||||
if(!isnum(index) || !istype(queue) || (index<1 || index>queue.len))
|
||||
return 0
|
||||
queue.Cut(index,++index)
|
||||
return 1
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/process_queue()
|
||||
var/datum/design/D = queue[1]
|
||||
if(!D)
|
||||
remove_from_queue(1)
|
||||
if(queue.len)
|
||||
return process_queue()
|
||||
else
|
||||
return
|
||||
temp = null
|
||||
while(D)
|
||||
if(stat&(NOPOWER|BROKEN))
|
||||
return 0
|
||||
if(!check_resources(D))
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps, \"Not enough resources. Queue processing stopped.\"")
|
||||
temp = {"<span class='alert'>Not enough resources to build next part.</span><br>
|
||||
<a href='?src=\ref[src];process_queue=1'>Try again</a> | <a href='?src=\ref[src];clear_temp=1'>Return</a><a>"}
|
||||
return 0
|
||||
remove_from_queue(1)
|
||||
build_part(D)
|
||||
D = listgetindex(queue, 1)
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps, \"Queue processing finished successfully.\"")
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/list_queue()
|
||||
var/output = "<b>Queue contains:</b>"
|
||||
if(!istype(queue) || !queue.len)
|
||||
output += "<br>Nothing"
|
||||
else
|
||||
output += "<ol>"
|
||||
var/i = 0
|
||||
for(var/datum/design/D in queue)
|
||||
i++
|
||||
var/obj/part = D.build_path
|
||||
output += "<li[!check_resources(D)?" style='color: #f00;'":null]>[initial(part.name)] - [i>1?"<a href='?src=\ref[src];queue_move=-1;index=[i]' class='arrow'>↑</a>":null] [i<queue.len?"<a href='?src=\ref[src];queue_move=+1;index=[i]' class='arrow'>↓</a>":null] <a href='?src=\ref[src];remove_from_queue=[i]'>Remove</a></li>"
|
||||
|
||||
output += "</ol>"
|
||||
output += "\[<a href='?src=\ref[src];process_queue=1'>Process queue</a> | <a href='?src=\ref[src];clear_queue=1'>Clear queue</a>\]"
|
||||
return output
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/update_tech()
|
||||
if(!files)
|
||||
return
|
||||
var/output
|
||||
for(var/datum/tech/T in files.known_tech)
|
||||
if(T && T.level > 1)
|
||||
var/diff
|
||||
switch(T.id)
|
||||
if("materials")
|
||||
//one materials level is 1/32, so that max level is 0.75 coefficient
|
||||
diff = round(initial(resource_coeff_tech) - (initial(resource_coeff_tech)*(T.level-1))/32,0.01)
|
||||
if(resource_coeff_tech>diff)
|
||||
resource_coeff_tech = diff
|
||||
output+="Production efficiency increased.<br>"
|
||||
if("programming")
|
||||
//one materials level is 1/40, so that max level is 0.8 coefficient
|
||||
diff = round(initial(time_coeff_tech) - (initial(time_coeff_tech)*(T.level-1))/40,0.1)
|
||||
if(time_coeff_tech>diff)
|
||||
time_coeff_tech = diff
|
||||
output+="Production routines updated.<br>"
|
||||
return output
|
||||
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/sync()
|
||||
temp = "Updating local R&D database..."
|
||||
updateUsrDialog()
|
||||
sleep(30) //only sleep if called by user
|
||||
var/area/localarea = get_area(src)
|
||||
|
||||
for(var/obj/machinery/computer/rdconsole/RDC in localarea.contents)
|
||||
if(!RDC.sync)
|
||||
continue
|
||||
for(var/datum/tech/T in RDC.files.known_tech)
|
||||
files.AddTech2Known(T)
|
||||
for(var/datum/design/D in RDC.files.known_designs)
|
||||
files.AddDesign2Known(D)
|
||||
files.RefreshResearch()
|
||||
temp = "Processed equipment designs.<br>"
|
||||
//check if the tech coefficients have changed
|
||||
temp += update_tech()
|
||||
temp += "<a href='?src=\ref[src];clear_temp=1'>Return</a>"
|
||||
|
||||
updateUsrDialog()
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps, \"Successfully synchronized with R&D server.\"")
|
||||
return
|
||||
|
||||
temp = "Unable to connect to local R&D Database.<br>Please check your connections and try again.<br><a href='?src=\ref[src];clear_temp=1'>Return</a>"
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/get_resource_cost_w_coeff(datum/design/D, resource, roundto = 1)
|
||||
return round(D.materials[resource]*resource_coeff*resource_coeff_tech, roundto)
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/get_construction_time_w_coeff(datum/design/D, roundto = 1) //aran
|
||||
return round(initial(D.construction_time)*time_coeff*time_coeff_tech, roundto)
|
||||
|
||||
/obj/machinery/spod_part_fabricator/attack_hand(mob/user)
|
||||
if(..())
|
||||
return 1
|
||||
return interact(user)
|
||||
|
||||
/obj/machinery/spod_part_fabricator/interact(mob/user as mob)
|
||||
var/dat, left_part
|
||||
if (..())
|
||||
return
|
||||
user.set_machine(src)
|
||||
if(exit.density)
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps, \"Error! Part outlet is obstructed.\"")
|
||||
return
|
||||
if(temp)
|
||||
left_part = temp
|
||||
else if(being_built)
|
||||
var/obj/I = being_built.build_path
|
||||
left_part = {"<TT>Building [initial(I.name)].<BR>
|
||||
Please wait until completion...</TT>"}
|
||||
else
|
||||
switch(screen)
|
||||
if("main")
|
||||
left_part = output_available_resources()+"<hr>"
|
||||
left_part += "<a href='?src=\ref[src];sync=1'>Sync with R&D servers</a><hr>"
|
||||
for(var/part_set in part_sets)
|
||||
left_part += "<a href='?src=\ref[src];part_set=[part_set]'>[part_set]</a> - \[<a href='?src=\ref[src];partset_to_queue=[part_set]'>Add all parts to queue</a>\]<br>"
|
||||
if("parts")
|
||||
left_part += output_parts_list(part_set)
|
||||
left_part += "<hr><a href='?src=\ref[src];screen=main'>Return</a>"
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<title>[name]</title>
|
||||
<style>
|
||||
.res_name {font-weight: bold; text-transform: capitalize;}
|
||||
.red {color: #f00;}
|
||||
.part {margin-bottom: 10px;}
|
||||
.arrow {text-decoration: none; font-size: 10px;}
|
||||
body, table {height: 100%;}
|
||||
td {vertical-align: top; padding: 5px;}
|
||||
html, body {padding: 0px; margin: 0px;}
|
||||
h1 {font-size: 18px; margin: 5px 0px;}
|
||||
</style>
|
||||
<script language='javascript' type='text/javascript'>
|
||||
[js_byjax]
|
||||
</script>
|
||||
</head><body>
|
||||
<body>
|
||||
<table style='width: 100%;'>
|
||||
<tr>
|
||||
<td style='width: 65%; padding-right: 10px;'>
|
||||
[left_part]
|
||||
</td>
|
||||
<td style='width: 35%; background: #ccc;' id='queue'>
|
||||
[list_queue()]
|
||||
</td>
|
||||
<tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>"}
|
||||
user << browse(dat, "window=mecha_fabricator;size=1000x430")
|
||||
onclose(user, "mecha_fabricator")
|
||||
return
|
||||
|
||||
/obj/machinery/spod_part_fabricator/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
var/datum/topic_input/filter = new /datum/topic_input(href,href_list)
|
||||
if(href_list["part_set"])
|
||||
var/tpart_set = filter.getStr("part_set")
|
||||
if(tpart_set)
|
||||
if(tpart_set=="clear")
|
||||
part_set = null
|
||||
else
|
||||
part_set = tpart_set
|
||||
screen = "parts"
|
||||
if(href_list["part"])
|
||||
var/T = filter.getStr("part")
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.build_type & PODFAB)
|
||||
if(D.id == T)
|
||||
if(!processing_queue)
|
||||
build_part(D)
|
||||
else
|
||||
add_to_queue(D)
|
||||
break
|
||||
if(href_list["add_to_queue"])
|
||||
var/T = filter.getStr("add_to_queue")
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.build_type & PODFAB)
|
||||
if(D.id == T)
|
||||
add_to_queue(D)
|
||||
break
|
||||
return update_queue_on_page()
|
||||
if(href_list["remove_from_queue"])
|
||||
remove_from_queue(filter.getNum("remove_from_queue"))
|
||||
return update_queue_on_page()
|
||||
if(href_list["partset_to_queue"])
|
||||
add_part_set_to_queue(filter.get("partset_to_queue"))
|
||||
return update_queue_on_page()
|
||||
if(href_list["process_queue"])
|
||||
spawn(-1)
|
||||
if(processing_queue || being_built)
|
||||
return 0
|
||||
processing_queue = 1
|
||||
process_queue()
|
||||
processing_queue = 0
|
||||
if(href_list["clear_temp"])
|
||||
temp = null
|
||||
if(href_list["screen"])
|
||||
screen = href_list["screen"]
|
||||
if(href_list["queue_move"] && href_list["index"])
|
||||
var/index = filter.getNum("index")
|
||||
var/new_index = index + filter.getNum("queue_move")
|
||||
if(isnum(index) && isnum(new_index))
|
||||
if(IsInRange(new_index,1,queue.len))
|
||||
queue.Swap(index,new_index)
|
||||
return update_queue_on_page()
|
||||
if(href_list["clear_queue"])
|
||||
queue = list()
|
||||
return update_queue_on_page()
|
||||
if(href_list["sync"])
|
||||
sync()
|
||||
if(href_list["part_desc"])
|
||||
var/T = filter.getStr("part_desc")
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.build_type & PODFAB)
|
||||
if(D.id == T)
|
||||
var/obj/part = D.build_path
|
||||
temp = {"<h1>[initial(part.name)] description:</h1>
|
||||
[initial(part.desc)]<br>
|
||||
<a href='?src=\ref[src];clear_temp=1'>Return</a>
|
||||
"}
|
||||
break
|
||||
|
||||
if(href_list["remove_mat"] && href_list["material"])
|
||||
var/amount = text2num(href_list["remove_mat"])
|
||||
var/material = href_list["material"]
|
||||
if(href_list["custom_eject"])
|
||||
amount = input("How many sheets would you like to eject from the machine?", "How much?", 1) as null|num
|
||||
amount = max(0,min(round(resources[material]/MINERAL_MATERIAL_AMOUNT),amount)) // Rounding errors aren't scary, as the mineral eject proc is smart
|
||||
if (!amount)
|
||||
return
|
||||
amount = round(amount)
|
||||
if(amount < 0 || amount > resources[material]) //href protection
|
||||
return
|
||||
|
||||
var/removed = remove_material(material,amount)
|
||||
if(removed == -1)
|
||||
temp = "Not enough [material2name(material)] to produce a sheet."
|
||||
else
|
||||
temp = "Ejected [removed] of [material2name(material)]"
|
||||
temp += "<br><a href='?src=\ref[src];clear_temp=1'>Return</a>"
|
||||
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/remove_material(var/mat_string, var/amount)
|
||||
if(resources[mat_string] < MINERAL_MATERIAL_AMOUNT) //not enough mineral for a sheet
|
||||
return -1
|
||||
var/type
|
||||
switch(mat_string)
|
||||
if(MAT_METAL)
|
||||
type = /obj/item/stack/sheet/metal
|
||||
if(MAT_GLASS)
|
||||
type = /obj/item/stack/sheet/glass
|
||||
if(MAT_GOLD)
|
||||
type = /obj/item/stack/sheet/mineral/gold
|
||||
if(MAT_SILVER)
|
||||
type = /obj/item/stack/sheet/mineral/silver
|
||||
if(MAT_DIAMOND)
|
||||
type = /obj/item/stack/sheet/mineral/diamond
|
||||
if(MAT_PLASMA)
|
||||
type = /obj/item/stack/sheet/mineral/plasma
|
||||
if(MAT_URANIUM)
|
||||
type = /obj/item/stack/sheet/mineral/uranium
|
||||
if(MAT_BANANIUM)
|
||||
type = /obj/item/stack/sheet/mineral/bananium
|
||||
else
|
||||
return 0
|
||||
var/result = 0
|
||||
|
||||
while(amount > 50)
|
||||
new type(get_turf(src),50)
|
||||
amount -= 50
|
||||
result += 50
|
||||
resources[mat_string] -= 50 * MINERAL_MATERIAL_AMOUNT
|
||||
|
||||
var/total_amount = round(resources[mat_string]/MINERAL_MATERIAL_AMOUNT)
|
||||
if(total_amount)//if there's still enough material for sheets
|
||||
var/obj/item/stack/sheet/res = new type(get_turf(src),min(amount,total_amount))
|
||||
resources[mat_string] -= res.amount*MINERAL_MATERIAL_AMOUNT
|
||||
result += res.amount
|
||||
|
||||
return result
|
||||
|
||||
|
||||
/obj/machinery/spod_part_fabricator/attackby(obj/W as obj, mob/user as mob, params)
|
||||
if(default_deconstruction_screwdriver(user, "fab-o", "fab-idle", W))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
|
||||
if(panel_open)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
for(var/material in resources)
|
||||
remove_material(material, resources[material]/MINERAL_MATERIAL_AMOUNT)
|
||||
default_deconstruction_crowbar(W)
|
||||
return 1
|
||||
else
|
||||
to_chat(user, "<span class='danger'>You can't load \the [name] while it's opened.</span>")
|
||||
return 1
|
||||
|
||||
if(istype(W, /obj/item/stack))
|
||||
var/material
|
||||
switch(W.type)
|
||||
if(/obj/item/stack/sheet/mineral/gold)
|
||||
material = MAT_GOLD
|
||||
if(/obj/item/stack/sheet/mineral/silver)
|
||||
material = MAT_SILVER
|
||||
if(/obj/item/stack/sheet/mineral/diamond)
|
||||
material = MAT_DIAMOND
|
||||
if(/obj/item/stack/sheet/mineral/plasma)
|
||||
material = MAT_PLASMA
|
||||
if(/obj/item/stack/sheet/metal)
|
||||
material = MAT_METAL
|
||||
if(/obj/item/stack/sheet/glass)
|
||||
material = MAT_GLASS
|
||||
if(/obj/item/stack/sheet/mineral/bananium)
|
||||
material = MAT_BANANIUM
|
||||
if(/obj/item/stack/sheet/mineral/uranium)
|
||||
material = MAT_URANIUM
|
||||
else
|
||||
return ..()
|
||||
|
||||
if(being_built)
|
||||
to_chat(user, "\The [src] is currently processing. Please wait until completion.")
|
||||
return
|
||||
if(res_max_amount - resources[material] < MINERAL_MATERIAL_AMOUNT) //overstuffing the fabricator
|
||||
to_chat(user, "\The [src] [material2name(material)] storage is full.")
|
||||
return
|
||||
var/obj/item/stack/sheet/stack = W
|
||||
var/sname = "[stack.name]"
|
||||
if(resources[material] < res_max_amount)
|
||||
overlays += "fab-load-[material2name(material)]"//loading animation is now an overlay based on material type. No more spontaneous conversion of all ores to metal. -vey
|
||||
|
||||
var/transfer_amount = min(stack.amount, round((res_max_amount - resources[material])/MINERAL_MATERIAL_AMOUNT,1))
|
||||
resources[material] += transfer_amount * MINERAL_MATERIAL_AMOUNT
|
||||
stack.use(transfer_amount)
|
||||
to_chat(user, "You insert [transfer_amount] [sname] sheet\s into \the [src].")
|
||||
sleep(10)
|
||||
updateUsrDialog()
|
||||
overlays -= "fab-load-[material2name(material)]" //No matter what the overlay shall still be deleted
|
||||
else
|
||||
to_chat(user, "\The [src] cannot hold any more [sname] sheet\s.")
|
||||
return
|
||||
|
||||
/obj/machinery/spod_part_fabricator/proc/material2name(var/ID)
|
||||
return copytext(ID,2)
|
||||
@@ -1,932 +0,0 @@
|
||||
#define DAMAGE 1
|
||||
#define FIRE 2
|
||||
|
||||
/obj/spacepod
|
||||
name = "\improper space pod"
|
||||
desc = "A space pod meant for space travel."
|
||||
icon = 'icons/goonstation/48x48/pods.dmi'
|
||||
density = 1 //Dense. To raise the heat.
|
||||
opacity = 0
|
||||
|
||||
anchored = 1
|
||||
unacidable = 1
|
||||
|
||||
layer = 3.9
|
||||
infra_luminosity = 15
|
||||
|
||||
var/mob/living/carbon/occupant
|
||||
var/mob/living/carbon/occupant2 //two seaters
|
||||
|
||||
var/datum/spacepod/equipment/equipment_system
|
||||
|
||||
var/battery_type = "/obj/item/weapon/stock_parts/cell/high"
|
||||
var/obj/item/weapon/stock_parts/cell/battery
|
||||
|
||||
var/datum/gas_mixture/cabin_air
|
||||
var/obj/machinery/portable_atmospherics/canister/internal_tank
|
||||
var/use_internal_tank = 0
|
||||
var/datum/global_iterator/pr_int_temp_processor //normalizes internal air mixture temperature
|
||||
var/datum/global_iterator/pr_give_air //moves air from tank to cabin
|
||||
|
||||
var/datum/effect/system/ion_trail_follow/space_trail/ion_trail
|
||||
|
||||
var/hatch_open = 0
|
||||
|
||||
var/next_firetime = 0
|
||||
|
||||
var/list/pod_overlays
|
||||
var/health = 250
|
||||
var/empcounter = 0 //Used for disabling movement when hit by an EMP
|
||||
|
||||
var/lights = 0
|
||||
var/lights_power = 6
|
||||
var/list/icon_light_color = list("pod_civ" = LIGHT_COLOR_WHITE, \
|
||||
"pod_mil" = "#BBF093", \
|
||||
"pod_synd" = LIGHT_COLOR_RED, \
|
||||
"pod_gold" = LIGHT_COLOR_WHITE, \
|
||||
"pod_black" = "#3B8FE5", \
|
||||
"pod_industrial" = "#CCCC00")
|
||||
|
||||
var/allow2enter = 1
|
||||
|
||||
var/move_delay = 2
|
||||
var/next_move = 0
|
||||
|
||||
/obj/spacepod/New()
|
||||
. = ..()
|
||||
if(!pod_overlays)
|
||||
pod_overlays = new/list(2)
|
||||
pod_overlays[DAMAGE] = image(icon, icon_state="pod_damage")
|
||||
pod_overlays[FIRE] = image(icon, icon_state="pod_fire")
|
||||
bound_width = 64
|
||||
bound_height = 64
|
||||
dir = EAST
|
||||
battery = new battery_type(src)
|
||||
add_cabin()
|
||||
add_airtank()
|
||||
src.ion_trail = new /datum/effect/system/ion_trail_follow/space_trail()
|
||||
src.ion_trail.set_up(src)
|
||||
src.ion_trail.start()
|
||||
src.use_internal_tank = 1
|
||||
pr_int_temp_processor = new /datum/global_iterator/pod_preserve_temp(list(src))
|
||||
pr_give_air = new /datum/global_iterator/pod_tank_give_air(list(src))
|
||||
equipment_system = new(src)
|
||||
spacepods_list += src
|
||||
|
||||
/obj/spacepod/Destroy()
|
||||
if (equipment_system.cargo_system)
|
||||
equipment_system.cargo_system.removed(null)
|
||||
qdel(equipment_system)
|
||||
equipment_system = null
|
||||
qdel(battery)
|
||||
battery = null
|
||||
qdel(cabin_air)
|
||||
cabin_air = null
|
||||
qdel(internal_tank)
|
||||
internal_tank = null
|
||||
qdel(pr_int_temp_processor)
|
||||
pr_int_temp_processor = null
|
||||
qdel(pr_give_air)
|
||||
pr_give_air = null
|
||||
qdel(ion_trail)
|
||||
ion_trail = null
|
||||
occupant_sanity_check()
|
||||
if(occupant)
|
||||
occupant.forceMove(get_turf(src))
|
||||
occupant = null
|
||||
if(occupant2)
|
||||
occupant2.forceMove(get_turf(src))
|
||||
occupant2 = null
|
||||
spacepods_list -= src
|
||||
return ..()
|
||||
|
||||
/obj/spacepod/process()
|
||||
if(src.empcounter > 0)
|
||||
src.empcounter--
|
||||
else
|
||||
processing_objects.Remove(src)
|
||||
|
||||
|
||||
/obj/spacepod/proc/update_icons()
|
||||
if(!pod_overlays)
|
||||
pod_overlays = new/list(2)
|
||||
pod_overlays[DAMAGE] = image(icon, icon_state="pod_damage")
|
||||
pod_overlays[FIRE] = image(icon, icon_state="pod_fire")
|
||||
|
||||
overlays.Cut()
|
||||
|
||||
if(health <= round(initial(health)/2))
|
||||
overlays += pod_overlays[DAMAGE]
|
||||
if(health <= round(initial(health)/4))
|
||||
overlays += pod_overlays[FIRE]
|
||||
|
||||
light_color = icon_light_color[src.icon_state]
|
||||
|
||||
/obj/spacepod/bullet_act(var/obj/item/projectile/P)
|
||||
if(P.damage && !P.nodamage)
|
||||
deal_damage(P.damage)
|
||||
else if(P.flag == "energy" && istype(P,/obj/item/projectile/ion)) //needed to make sure ions work properly
|
||||
empulse(src, 1, 1)
|
||||
|
||||
/obj/spacepod/blob_act()
|
||||
deal_damage(30)
|
||||
return
|
||||
|
||||
/obj/spacepod/attack_animal(mob/living/simple_animal/user as mob)
|
||||
if(user.melee_damage_upper == 0)
|
||||
user.custom_emote(1, "[user.friendly] [src]")
|
||||
else
|
||||
var/damage = rand(user.melee_damage_lower, user.melee_damage_upper)
|
||||
deal_damage(damage)
|
||||
visible_message("\red <B>[user]</B> [user.attacktext] [src]!")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
|
||||
return
|
||||
|
||||
/obj/spacepod/attack_alien(mob/user as mob)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
deal_damage(15)
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
|
||||
to_chat(user, "\red You slash at \the [src]!")
|
||||
visible_message("\red The [user] slashes at [src.name]'s armor!")
|
||||
return
|
||||
|
||||
/obj/spacepod/proc/deal_damage(var/damage)
|
||||
var/oldhealth = health
|
||||
health = max(0, health - damage)
|
||||
var/percentage = (health / initial(health)) * 100
|
||||
occupant_sanity_check()
|
||||
if(occupant && oldhealth > health && percentage <= 25 && percentage > 0)
|
||||
var/sound/S = sound('sound/effects/engine_alert2.ogg')
|
||||
S.wait = 0 //No queue
|
||||
S.channel = 0 //Any channel
|
||||
S.volume = 50
|
||||
to_chat(occupant, S)
|
||||
if(occupant2)
|
||||
to_chat(occupant2, S)
|
||||
if(occupant && oldhealth > health && !health)
|
||||
var/sound/S = sound('sound/effects/engine_alert1.ogg')
|
||||
S.wait = 0
|
||||
S.channel = 0
|
||||
S.volume = 50
|
||||
to_chat(occupant, S)
|
||||
if(occupant2)
|
||||
to_chat(occupant2, S)
|
||||
if(!health)
|
||||
spawn(0)
|
||||
if(occupant)
|
||||
to_chat(occupant, "<span class='userdanger'>Critical damage to the vessel detected, core explosion imminent!</span>")
|
||||
if(occupant2)
|
||||
to_chat(occupant2, "<span class='userdanger'>Critical damage to the vessel detected, core explosion imminent!</span>")
|
||||
|
||||
for(var/i = 10, i >= 0; --i)
|
||||
if(occupant)
|
||||
to_chat(occupant, "<span class='warning'>[i]</span>")
|
||||
if(occupant2)
|
||||
to_chat(occupant2, "<span class='warning'>[i]</span>")
|
||||
if(i == 0)
|
||||
explosion(loc, 2, 4, 8)
|
||||
qdel(src)
|
||||
sleep(10)
|
||||
|
||||
update_icons()
|
||||
|
||||
/obj/spacepod/proc/repair_damage(var/repair_amount)
|
||||
if(health)
|
||||
health = min(initial(health), health + repair_amount)
|
||||
update_icons()
|
||||
|
||||
|
||||
/obj/spacepod/ex_act(severity)
|
||||
occupant_sanity_check()
|
||||
switch(severity)
|
||||
if(1)
|
||||
var/mob/living/carbon/human/H = occupant
|
||||
var/mob/living/carbon/human/H2 = occupant2
|
||||
if(H)
|
||||
H.forceMove(get_turf(src))
|
||||
H.ex_act(severity + 1)
|
||||
to_chat(H, "<span class='warning'>You are forcefully thrown from \the [src]!</span>")
|
||||
if(H2)
|
||||
H2.forceMove(get_turf(src))
|
||||
H2.ex_act(severity + 1)
|
||||
to_chat(H2, "<span class='warning'>You are forcefully thrown from \the [src]!</span>")
|
||||
qdel(ion_trail)
|
||||
qdel(src)
|
||||
if(2)
|
||||
deal_damage(100)
|
||||
if(3)
|
||||
if(prob(40))
|
||||
deal_damage(50)
|
||||
|
||||
/obj/spacepod/emp_act(severity)
|
||||
occupant_sanity_check()
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(occupant)
|
||||
to_chat(occupant, "<span class='warning'>The pod console flashes 'Heavy EMP WAVE DETECTED'.</span>")//warn the occupants
|
||||
if(occupant2)
|
||||
to_chat(occupant2, "<span class='warning'>The pod console flashes 'Heavy EMP WAVE DETECTED'.</span>")//warn the occupants
|
||||
|
||||
|
||||
if(battery)
|
||||
battery.charge = max(0, battery.charge - 5000) //Cell EMP act is too weak, this pod needs to be sapped.
|
||||
src.deal_damage(100)
|
||||
if(src.empcounter < 40)
|
||||
src.empcounter = 40 //Disable movement for 40 ticks. Plenty long enough.
|
||||
processing_objects.Add(src)
|
||||
|
||||
if(2)
|
||||
if(occupant)
|
||||
to_chat(occupant, "<span class='warning'>The pod console flashes 'EMP WAVE DETECTED'.</span>")//warn the occupants
|
||||
if(occupant2)
|
||||
to_chat(occupant2, "<span class='warning'>The pod console flashes 'EMP WAVE DETECTED'.</span>")//warn the occupants
|
||||
|
||||
deal_damage(40)
|
||||
if(battery)
|
||||
battery.charge = max(0, battery.charge - 2500) //Cell EMP act is too weak, this pod needs to be sapped.
|
||||
if(empcounter < 20)
|
||||
empcounter = 20 //Disable movement for 20 ticks.
|
||||
processing_objects.Add(src)
|
||||
|
||||
/obj/spacepod/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(iscrowbar(W))
|
||||
if(!equipment_system.lock_system || allow2enter || hatch_open)
|
||||
hatch_open = !hatch_open
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You [hatch_open ? "open" : "close"] the maintenance hatch.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The hatch is locked shut!</span>")
|
||||
if(istype(W, /obj/item/weapon/stock_parts/cell))
|
||||
if(!hatch_open)
|
||||
to_chat(user, "\red The maintenance hatch is closed!")
|
||||
return
|
||||
if(battery)
|
||||
to_chat(user, "<span class='notice'>The pod already has a battery.</span>")
|
||||
return
|
||||
user.drop_item(W)
|
||||
battery = W
|
||||
W.forceMove(src)
|
||||
return
|
||||
if(istype(W, /obj/item/device/spacepod_equipment))
|
||||
if(!hatch_open)
|
||||
to_chat(user, "\red The maintenance hatch is closed!")
|
||||
return
|
||||
if(!equipment_system)
|
||||
to_chat(user, "<span class='warning'>The pod has no equipment datum, yell at pomf</span>")
|
||||
return
|
||||
if(istype(W, /obj/item/device/spacepod_equipment/weaponry))
|
||||
if(equipment_system.weapon_system)
|
||||
to_chat(user, "<span class='notice'>The pod already has a weapon system, remove it first.</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You insert \the [W] into the equipment system.</span>")
|
||||
user.drop_item(W)
|
||||
W.forceMove(src)
|
||||
equipment_system.weapon_system = W
|
||||
equipment_system.weapon_system.my_atom = src
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/device/spacepod_equipment/misc))
|
||||
if(equipment_system.misc_system)
|
||||
to_chat(user, "<span class='notice'>The pod already has a miscellaneous system, remove it first.</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You insert \the [W] into the equipment system.</span>")
|
||||
user.drop_item(W)
|
||||
W.forceMove(src)
|
||||
equipment_system.misc_system = W
|
||||
equipment_system.misc_system.my_atom = src
|
||||
return
|
||||
if(istype(W, /obj/item/device/spacepod_equipment/cargo))
|
||||
if(equipment_system.cargo_system)
|
||||
to_chat(user, "<span class='notice'>The pod already has a cargo system, remove it first.</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You insert \the [W] into the cargo system.</span>")
|
||||
user.drop_item(W)
|
||||
W.forceMove(src)
|
||||
equipment_system.cargo_system = W
|
||||
equipment_system.cargo_system.my_atom = src
|
||||
return
|
||||
if(istype(W, /obj/item/device/spacepod_equipment/lock))
|
||||
if(equipment_system.lock_system)
|
||||
to_chat(user, "<span class='notice'>The pod already has a lock system, remove it first.</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You insert \the [W] into the lock system.</span>")
|
||||
user.drop_item(W)
|
||||
W.forceMove(src)
|
||||
equipment_system.lock_system = W
|
||||
equipment_system.lock_system.my_atom = src
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/device/spacepod_key) && istype(equipment_system.lock_system, /obj/item/device/spacepod_equipment/lock/keyed))
|
||||
var/obj/item/device/spacepod_key/key = W
|
||||
if (key.id == equipment_system.lock_system.id)
|
||||
locksecondseat()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>This is the wrong key!</span>")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
if(!hatch_open)
|
||||
to_chat(user, "\red You must open the maintenance hatch before attempting repairs.")
|
||||
return
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(!WT.isOn())
|
||||
to_chat(user, "\red The welder must be on for this task.")
|
||||
return
|
||||
if (health < initial(health))
|
||||
to_chat(user, "\blue You start welding the spacepod...")
|
||||
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!src || !WT.remove_fuel(3, user)) return
|
||||
repair_damage(10)
|
||||
to_chat(user, "\blue You mend some [pick("dents","bumps","damage")] with \the [WT]")
|
||||
else
|
||||
to_chat(user, "\blue <b>\The [src] is fully repaired!</b>")
|
||||
|
||||
|
||||
/obj/spacepod/attack_hand(mob/user as mob)
|
||||
if(!hatch_open)
|
||||
return ..()
|
||||
if(!equipment_system || !istype(equipment_system))
|
||||
to_chat(user, "<span class='warning'>The pod has no equpment datum, or is the wrong type, yell at pomf.</span>")
|
||||
return
|
||||
var/list/possible = list()
|
||||
if(battery)
|
||||
possible.Add("Energy Cell")
|
||||
if(equipment_system.weapon_system)
|
||||
possible.Add("Weapon System")
|
||||
if(equipment_system.misc_system)
|
||||
possible.Add("Misc. System")
|
||||
if(equipment_system.cargo_system)
|
||||
possible.Add("Cargo System")
|
||||
if(equipment_system.lock_system)
|
||||
possible.Add("Lock System")
|
||||
/* Not yet implemented
|
||||
if(equipment_system.engine_system)
|
||||
possible.Add("Engine System")
|
||||
if(equipment_system.shield_system)
|
||||
possible.Add("Shield System")
|
||||
*/
|
||||
var/obj/item/device/spacepod_equipment/SPE
|
||||
switch(input(user, "Remove which equipment?", null, null) as null|anything in possible)
|
||||
if("Energy Cell")
|
||||
if(user.put_in_any_hand_if_possible(battery))
|
||||
to_chat(user, "<span class='notice'>You remove \the [battery] from the space pod</span>")
|
||||
battery = null
|
||||
if("Weapon System")
|
||||
SPE = equipment_system.weapon_system
|
||||
if(user.put_in_any_hand_if_possible(SPE))
|
||||
to_chat(user, "<span class='notice'>You remove \the [SPE] from the equipment system.</span>")
|
||||
SPE.removed(user)
|
||||
SPE.my_atom = null
|
||||
equipment_system.weapon_system = null
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need an open hand to do that.</span>")
|
||||
if("Misc. System")
|
||||
SPE = equipment_system.misc_system
|
||||
if(user.put_in_any_hand_if_possible(SPE))
|
||||
to_chat(user, "<span class='notice'>You remove \the [SPE] from the equipment system.</span>")
|
||||
SPE.removed(user)
|
||||
SPE.my_atom = null
|
||||
equipment_system.misc_system = null
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need an open hand to do that.</span>")
|
||||
if("Cargo System")
|
||||
SPE = equipment_system.cargo_system
|
||||
if(user.put_in_any_hand_if_possible(SPE))
|
||||
to_chat(user, "<span class='notice'>You remove \the [SPE] from the equipment system.</span>")
|
||||
SPE.removed(user)
|
||||
SPE.my_atom = null
|
||||
equipment_system.cargo_system = null
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need an open hand to do that.</span>")
|
||||
if("Lock System")
|
||||
SPE = equipment_system.lock_system
|
||||
if(user.put_in_any_hand_if_possible(SPE))
|
||||
to_chat(user, "<span class='notice'>You remove \the [SPE] from the equipment system.</span>")
|
||||
SPE.removed(user)
|
||||
SPE.my_atom = null
|
||||
equipment_system.lock_system = null
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need an open hand to do that.</span>")
|
||||
/*
|
||||
if("engine system")
|
||||
SPE = equipment_system.engine_system
|
||||
if(user.put_in_any_hand_if_possible(SPE))
|
||||
to_chat(user, "<span class='notice'>You remove \the [SPE] from the equipment system.</span>")
|
||||
equipment_system.engine_system = null
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need an open hand to do that.</span>")
|
||||
if("shield system")
|
||||
SPE = equipment_system.shield_system
|
||||
if(user.put_in_any_hand_if_possible(SPE))
|
||||
to_chat(user, "<span class='notice'>You remove \the [SPE] from the equipment system.</span>")
|
||||
equipment_system.shield_system = null
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need an open hand to do that.</span>")
|
||||
*/
|
||||
|
||||
return
|
||||
|
||||
/obj/spacepod/civilian
|
||||
icon_state = "pod_civ"
|
||||
desc = "A sleek civilian space pod."
|
||||
|
||||
/obj/spacepod/random
|
||||
icon_state = "pod_civ"
|
||||
// placeholder
|
||||
|
||||
/obj/spacepod/sec
|
||||
name = "\improper security spacepod"
|
||||
desc = "An armed security spacepod with reinforced armor plating."
|
||||
icon_state = "pod_mil"
|
||||
health = 400
|
||||
|
||||
/obj/spacepod/sec/New()
|
||||
..()
|
||||
var/obj/item/device/spacepod_equipment/weaponry/burst_taser/T = new /obj/item/device/spacepod_equipment/weaponry/taser
|
||||
T.loc = equipment_system
|
||||
equipment_system.weapon_system = T
|
||||
equipment_system.weapon_system.my_atom = src
|
||||
var/obj/item/device/spacepod_equipment/misc/tracker/L = new /obj/item/device/spacepod_equipment/misc/tracker
|
||||
L.loc = equipment_system
|
||||
equipment_system.misc_system = L
|
||||
equipment_system.misc_system.my_atom = src
|
||||
equipment_system.misc_system.enabled = 1
|
||||
var/obj/item/device/spacepod_equipment/lock/keyed/K = new /obj/item/device/spacepod_equipment/lock/keyed
|
||||
K.loc = equipment_system
|
||||
equipment_system.lock_system = K
|
||||
equipment_system.lock_system.my_atom = src
|
||||
equipment_system.lock_system.id = 100000
|
||||
return
|
||||
|
||||
/obj/spacepod/random/New()
|
||||
..()
|
||||
icon_state = pick("pod_civ", "pod_black", "pod_mil", "pod_synd", "pod_gold", "pod_industrial")
|
||||
switch(icon_state)
|
||||
if("pod_civ")
|
||||
desc = "A sleek civilian space pod."
|
||||
if("pod_black")
|
||||
desc = "An all black space pod with no insignias."
|
||||
if("pod_mil")
|
||||
desc = "A dark grey space pod brandishing the Nanotrasen Military insignia"
|
||||
if("pod_synd")
|
||||
desc = "A menacing military space pod with Fuck NT stenciled onto the side"
|
||||
if("pod_gold")
|
||||
desc = "A civilian space pod with a gold body, must have cost somebody a pretty penny"
|
||||
if("pod_industrial")
|
||||
desc = "A rough looking space pod meant for industrial work"
|
||||
update_icons()
|
||||
|
||||
/obj/spacepod/verb/toggle_internal_tank()
|
||||
set name = "Toggle internal airtank usage"
|
||||
set category = "Spacepod"
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
return
|
||||
use_internal_tank = !use_internal_tank
|
||||
to_chat(occupant, "<span class='notice'>Now taking air from [use_internal_tank?"internal airtank":"environment"].</span>")
|
||||
return
|
||||
|
||||
/obj/spacepod/proc/add_cabin()
|
||||
cabin_air = new
|
||||
cabin_air.temperature = T20C
|
||||
cabin_air.volume = 200
|
||||
cabin_air.oxygen = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
|
||||
cabin_air.nitrogen = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
|
||||
return cabin_air
|
||||
|
||||
/obj/spacepod/proc/add_airtank()
|
||||
internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src)
|
||||
return internal_tank
|
||||
|
||||
/obj/spacepod/proc/get_turf_air()
|
||||
var/turf/T = get_turf(src)
|
||||
if(T)
|
||||
. = T.return_air()
|
||||
return
|
||||
|
||||
/obj/spacepod/remove_air(amount)
|
||||
if(use_internal_tank)
|
||||
return cabin_air.remove(amount)
|
||||
else
|
||||
var/turf/T = get_turf(src)
|
||||
if(T)
|
||||
return T.remove_air(amount)
|
||||
return
|
||||
|
||||
/obj/spacepod/return_air()
|
||||
if(use_internal_tank)
|
||||
return cabin_air
|
||||
return get_turf_air()
|
||||
|
||||
/obj/spacepod/proc/return_pressure()
|
||||
. = 0
|
||||
if(use_internal_tank)
|
||||
. = cabin_air.return_pressure()
|
||||
else
|
||||
var/datum/gas_mixture/t_air = get_turf_air()
|
||||
if(t_air)
|
||||
. = t_air.return_pressure()
|
||||
return
|
||||
|
||||
/obj/spacepod/proc/return_temperature()
|
||||
. = 0
|
||||
if(use_internal_tank)
|
||||
. = cabin_air.return_temperature()
|
||||
else
|
||||
var/datum/gas_mixture/t_air = get_turf_air()
|
||||
if(t_air)
|
||||
. = t_air.return_temperature()
|
||||
return
|
||||
|
||||
/obj/spacepod/proc/moved_other_inside(var/mob/living/carbon/human/H as mob)
|
||||
occupant_sanity_check()
|
||||
if(!occupant2)
|
||||
H.stop_pulling()
|
||||
H.forceMove(src)
|
||||
occupant2 = H
|
||||
H.forceMove(src)
|
||||
playsound(src, 'sound/machines/windowdoor.ogg', 50, 1)
|
||||
return 1
|
||||
|
||||
/obj/spacepod/MouseDrop_T(atom/A, mob/user)
|
||||
if(istype(A,/mob))
|
||||
var/mob/M = A
|
||||
if(!isliving(M))
|
||||
return
|
||||
|
||||
occupant_sanity_check()
|
||||
|
||||
if(M != user && M.stat == DEAD && allow2enter)
|
||||
if(occupant2 && !occupant)
|
||||
to_chat(usr, "<span class='danger'><b>You can't put a corpse into the driver's seat!</b></span>")
|
||||
return 0
|
||||
if(!occupant2)
|
||||
visible_message("<span class='danger'>[user.name] starts loading [M.name] into the pod!</span>")
|
||||
sleep(10)
|
||||
moved_other_inside(M)
|
||||
|
||||
if(M == user)
|
||||
if(!equipment_system.lock_system || allow2enter)
|
||||
enter_pod(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src]'s doors are locked!</span>")
|
||||
|
||||
|
||||
if(istype(A, /obj/structure/ore_box)) // For loading ore boxes
|
||||
var/obj/structure/ore_box/O = A
|
||||
if(equipment_system.cargo_system && istype(equipment_system.cargo_system,/obj/item/device/spacepod_equipment/cargo/ore))
|
||||
var/obj/item/device/spacepod_equipment/cargo/ore/C = equipment_system.cargo_system
|
||||
if(!C.box)
|
||||
to_chat(user, "<span class='notice'>You begin loading \the [O] into \the [src]'s [equipment_system.cargo_system]</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
C.box = O
|
||||
O.forceMove(C)
|
||||
to_chat(user, "<span class='notice'>You load \the [O] into \the [src]'s [equipment_system.cargo_system]!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You fail to load \the [O] into \the [src]'s [equipment_system.cargo_system]</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src] already has \an [C.box]</span>")
|
||||
|
||||
/obj/spacepod/verb/enter_pod(mob/user = usr)
|
||||
set category = "Object"
|
||||
set name = "Enter Pod"
|
||||
set src in oview(1)
|
||||
|
||||
if (usr.stat != CONSCIOUS)
|
||||
return
|
||||
|
||||
if(get_dist(src, user) > 2 || get_dist(usr, user) > 1)
|
||||
to_chat(usr, "They are too far away to put inside")
|
||||
return
|
||||
|
||||
if(!istype(user))
|
||||
return 0
|
||||
|
||||
var/fukkendisk = user.GetTypeInAllContents(/obj/item/weapon/disk/nuclear)
|
||||
|
||||
if(user.incapacitated()) //are you cuffed, dying, lying, stunned or other
|
||||
return 0
|
||||
if(!ishuman(user))
|
||||
return 0
|
||||
|
||||
if(fukkendisk)
|
||||
to_chat(user, "<span class='danger'><B>The nuke-disk is locking the door every time you try to open it. You get the feeling that it doesn't want to go into the spacepod.</b></span>")
|
||||
return 0
|
||||
|
||||
for(var/mob/living/carbon/slime/S in range(1,usr))
|
||||
if(S.Victim == user)
|
||||
to_chat(user, "You're too busy getting your life sucked out of you.")
|
||||
return 0
|
||||
|
||||
move_inside(user)
|
||||
|
||||
/obj/spacepod/proc/move_inside(mob/user)
|
||||
if(!istype(user))
|
||||
log_debug("SHIT'S GONE WRONG WITH THE SPACEPOD [src] AT [x], [y], [z], AREA [get_area(src)], TURF [get_turf(src)]")
|
||||
|
||||
occupant_sanity_check()
|
||||
|
||||
if(!occupant)
|
||||
visible_message("<span class='notice'>[user] starts to climb into \the [src].</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
if(!occupant)
|
||||
user.stop_pulling()
|
||||
occupant = user
|
||||
user.forceMove(src)
|
||||
add_fingerprint(user)
|
||||
playsound(src, 'sound/machines/windowdoor.ogg', 50, 1)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[occupant] was faster. Try better next time, loser.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You stop entering \the [src].</span>")
|
||||
|
||||
else if(!occupant2)
|
||||
visible_message("<span class='notice'>[user] starts to climb into \the [src].</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
if(!occupant2)
|
||||
user.stop_pulling()
|
||||
occupant2 = user
|
||||
user.forceMove(src)
|
||||
add_fingerprint(user)
|
||||
playsound(src, 'sound/machines/windowdoor.ogg', 50, 1)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[occupant] was faster. Try better next time, loser.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You stop entering \the [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='danger'>You can't fit in \the [src], it's full!</span>")
|
||||
|
||||
/obj/spacepod/proc/occupant_sanity_check()
|
||||
if(occupant)
|
||||
if(!ismob(occupant))
|
||||
occupant.forceMove(get_turf(src))
|
||||
log_debug("##SPACEPOD WARNING: NON-MOB OCCUPANT [occupant], TURF [get_turf(src)] | AREA [get_area(src)] | COORDS [x], [y], [z]")
|
||||
occupant = null
|
||||
else if(occupant.loc != src)
|
||||
log_debug("##SPACEPOD WARNING: OCCUPANT [occupant] ESCAPED, TURF [get_turf(src)] | AREA [get_area(src)] | COORDS [x], [y], [z]")
|
||||
occupant = null
|
||||
if(occupant2)
|
||||
if(!ismob(occupant2))
|
||||
occupant2.forceMove(get_turf(src))
|
||||
log_debug("##SPACEPOD WARNING: NON-MOB OCCUPANT [occupant2], TURF [get_turf(src)] | AREA [get_area(src)] | COORDS [x], [y], [z]")
|
||||
occupant2 = null
|
||||
else if(occupant2.loc != src)
|
||||
log_debug("##SPACEPOD WARNING: OCCUPANT [occupant2] ESCAPED, TURF [get_turf(src)] | AREA [get_area(src)] | COORDS [x], [y], [z]")
|
||||
occupant2 = null
|
||||
|
||||
/obj/spacepod/verb/exit_pod()
|
||||
set name = "Exit pod"
|
||||
set category = "Spacepod"
|
||||
set src = usr.loc
|
||||
|
||||
var/mob/user = usr
|
||||
var/spos = 0
|
||||
if(!istype(user))
|
||||
return
|
||||
|
||||
occupant_sanity_check()
|
||||
|
||||
if(occupant == user) spos = 1
|
||||
if(occupant2 == user) spos = 2
|
||||
|
||||
switch(spos)
|
||||
if(0) return
|
||||
if(1)
|
||||
if(occupant2)
|
||||
to_chat(occupant2, "<span class='notice'>[occupant.name] climbs out of the pod!</span>")
|
||||
occupant.forceMove(src.loc)
|
||||
occupant = null
|
||||
to_chat(user, "<span class='notice'>You climb out of \the [src].</span>")
|
||||
if(2)
|
||||
if(occupant)
|
||||
to_chat(occupant, "<span class='notice'>[occupant2.name] climbs out of the pod!</span>")
|
||||
occupant2.forceMove(src.loc)
|
||||
occupant2 = null
|
||||
to_chat(user, "<span class='notice'>You climb out of \the [src].</span>")
|
||||
|
||||
/obj/spacepod/verb/exit_pod2()
|
||||
set name = "Eject Secondary Seat"
|
||||
set category = "Spacepod"
|
||||
set src = usr.loc
|
||||
|
||||
occupant_sanity_check()
|
||||
|
||||
if(!occupant2)
|
||||
to_chat(usr, "<span class='notice'>There is no one in the second seat.</span>")
|
||||
return
|
||||
|
||||
if(usr == occupant2)
|
||||
to_chat(usr, "<span class='notice'>How do you plan to do that? The eject button is out of reach.</span>")
|
||||
return
|
||||
|
||||
if(usr == occupant)
|
||||
to_chat(usr, "<span class='notice'>You eject [occupant2.name].</span>")
|
||||
to_chat(occupant2, "<span class='danger'>\The [src] ejects you forcefully!</span>")
|
||||
inertia_dir = 0
|
||||
occupant2.forceMove(src.loc)
|
||||
occupant2 = null
|
||||
|
||||
/obj/spacepod/verb/locksecondseat()
|
||||
set name = "Lock Doors"
|
||||
set category = "Spacepod"
|
||||
set src = usr.loc
|
||||
|
||||
if(CheckIfOccupant2(usr))
|
||||
if(!allow2enter)
|
||||
to_chat(usr, "<span class='notice'>You can't [allow2enter ? "lock" : "unlock"] the doors from your seat.</span>")
|
||||
return
|
||||
|
||||
allow2enter = !allow2enter
|
||||
to_chat(usr, "<span class='warning'>You [allow2enter ? "unlock" : "lock"] the doors.</span>")
|
||||
|
||||
|
||||
/obj/spacepod/verb/toggleDoors()
|
||||
set name = "Toggle Nearby Pod Doors"
|
||||
set category = "Spacepod"
|
||||
set src = usr.loc
|
||||
|
||||
if(CheckIfOccupant2(usr)) return
|
||||
for(var/obj/machinery/door/poddoor/multi_tile/P in orange(3,src))
|
||||
var/mob/living/carbon/human/L = usr
|
||||
if(P.check_access(L.get_active_hand()) || P.check_access(L.wear_id))
|
||||
if(P.density)
|
||||
P.open()
|
||||
return 1
|
||||
else
|
||||
P.close()
|
||||
return 1
|
||||
to_chat(usr, "<span class='warning'>Access denied.</span>")
|
||||
return
|
||||
|
||||
to_chat(usr, "<span class='warning'>You are not close to any pod doors.</span>")
|
||||
return
|
||||
|
||||
|
||||
/obj/spacepod/verb/fireWeapon()
|
||||
if(!CheckIfOccupant2(usr))
|
||||
set name = "Fire Pod Weapons"
|
||||
set desc = "Fire the weapons."
|
||||
set category = "Spacepod"
|
||||
set src = usr.loc
|
||||
if(!equipment_system.weapon_system)
|
||||
to_chat(usr, "<span class='warning'>\The [src] has no weapons!</span>")
|
||||
return
|
||||
equipment_system.weapon_system.fire_weapons()
|
||||
|
||||
/obj/spacepod/verb/unload()
|
||||
if(!CheckIfOccupant2(usr))
|
||||
set name = "Unload Cargo"
|
||||
set desc = "Unloads the cargo"
|
||||
set category = "Spacepod"
|
||||
set src = usr.loc
|
||||
if(!equipment_system.cargo_system)
|
||||
to_chat(usr, "<span class='warning'>\The [src] has no cargo system!</span>")
|
||||
return
|
||||
equipment_system.cargo_system.unload()
|
||||
|
||||
/obj/spacepod/verb/toggleLights()
|
||||
set name = "Toggle Lights"
|
||||
set category = "Spacepod"
|
||||
set src = usr.loc
|
||||
if(!CheckIfOccupant2(usr))
|
||||
lightsToggle()
|
||||
|
||||
/obj/spacepod/proc/lightsToggle()
|
||||
lights = !lights
|
||||
if(lights)
|
||||
set_light(lights_power)
|
||||
else
|
||||
set_light(0)
|
||||
to_chat(occupant, "Toggled lights [lights ? "on" : "off"].")
|
||||
return
|
||||
|
||||
/obj/spacepod/proc/enter_after(delay as num, var/mob/user as mob, var/numticks = 5)
|
||||
var/delayfraction = delay/numticks
|
||||
|
||||
var/turf/T = user.loc
|
||||
|
||||
for(var/i = 0, i<numticks, i++)
|
||||
sleep(delayfraction)
|
||||
if(!src || !user || !user.canmove || !(user.loc == T))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/datum/global_iterator/pod_preserve_temp //normalizing cabin air temperature to 20 degrees celsium
|
||||
delay = 20
|
||||
|
||||
process(var/obj/spacepod/spacepod)
|
||||
if(spacepod.cabin_air && spacepod.cabin_air.return_volume() > 0)
|
||||
var/delta = spacepod.cabin_air.temperature - T20C
|
||||
spacepod.cabin_air.temperature -= max(-10, min(10, round(delta/4,0.1)))
|
||||
return
|
||||
|
||||
/datum/global_iterator/pod_tank_give_air
|
||||
delay = 15
|
||||
|
||||
/datum/global_iterator/pod_tank_give_air/process(var/obj/spacepod/spacepod)
|
||||
if(spacepod && spacepod.internal_tank)
|
||||
var/datum/gas_mixture/tank_air = spacepod.internal_tank.return_air()
|
||||
var/datum/gas_mixture/cabin_air = spacepod.cabin_air
|
||||
|
||||
var/release_pressure = ONE_ATMOSPHERE
|
||||
var/cabin_pressure = cabin_air.return_pressure()
|
||||
var/pressure_delta = min(release_pressure - cabin_pressure, (tank_air.return_pressure() - cabin_pressure)/2)
|
||||
var/transfer_moles = 0
|
||||
if(pressure_delta > 0) //cabin pressure lower than release pressure
|
||||
if(tank_air.return_temperature() > 0)
|
||||
transfer_moles = pressure_delta*cabin_air.return_volume()/(cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION)
|
||||
var/datum/gas_mixture/removed = tank_air.remove(transfer_moles)
|
||||
cabin_air.merge(removed)
|
||||
else if(pressure_delta < 0) //cabin pressure higher than release pressure
|
||||
var/datum/gas_mixture/t_air = spacepod.get_turf_air()
|
||||
pressure_delta = cabin_pressure - release_pressure
|
||||
if(t_air)
|
||||
pressure_delta = min(cabin_pressure - t_air.return_pressure(), pressure_delta)
|
||||
if(pressure_delta > 0) //if location pressure is lower than cabin pressure
|
||||
transfer_moles = pressure_delta*cabin_air.return_volume()/(cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION)
|
||||
var/datum/gas_mixture/removed = cabin_air.remove(transfer_moles)
|
||||
if(t_air)
|
||||
t_air.merge(removed)
|
||||
else //just delete the cabin gas, we're in space or some shit
|
||||
qdel(removed)
|
||||
else
|
||||
return stop()
|
||||
return
|
||||
|
||||
/obj/spacepod/relaymove(mob/user, direction)
|
||||
if(!CheckIfOccupant2(user))
|
||||
handlerelaymove(user, direction)
|
||||
|
||||
/obj/spacepod/proc/handlerelaymove(mob/user, direction)
|
||||
if(world.time < next_move)
|
||||
return 0
|
||||
var/moveship = 1
|
||||
if(battery && battery.charge >= 1 && health && empcounter == 0)
|
||||
src.dir = direction
|
||||
switch(direction)
|
||||
if(NORTH)
|
||||
if(inertia_dir == SOUTH)
|
||||
inertia_dir = 0
|
||||
moveship = 0
|
||||
if(SOUTH)
|
||||
if(inertia_dir == NORTH)
|
||||
inertia_dir = 0
|
||||
moveship = 0
|
||||
if(EAST)
|
||||
if(inertia_dir == WEST)
|
||||
inertia_dir = 0
|
||||
moveship = 0
|
||||
if(WEST)
|
||||
if(inertia_dir == EAST)
|
||||
inertia_dir = 0
|
||||
moveship = 0
|
||||
if(moveship)
|
||||
Move(get_step(src, direction), direction)
|
||||
if(equipment_system.cargo_system)
|
||||
for (var/turf/T in locs)
|
||||
for (var/obj/item/I in T.contents)
|
||||
equipment_system.cargo_system.passover(I)
|
||||
|
||||
else
|
||||
if(!battery)
|
||||
to_chat(user, "<span class='warning'>No energy cell detected.</span>")
|
||||
else if(battery.charge < 1)
|
||||
to_chat(user, "<span class='warning'>Not enough charge left.</span>")
|
||||
else if(!health)
|
||||
to_chat(user, "<span class='warning'>She's dead, Jim</span>")
|
||||
else if(empcounter != 0)
|
||||
to_chat(user, "<span class='warning'>The pod control interface isn't responding. The console indicates [empcounter] seconds before reboot.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Unknown error has occurred, yell at the coders.</span>")
|
||||
return 0
|
||||
battery.charge = max(0, battery.charge - 1)
|
||||
next_move = world.time + move_delay
|
||||
|
||||
/obj/spacepod/proc/CheckIfOccupant2(mob/user)
|
||||
if(!src.occupant2)
|
||||
return 0
|
||||
if(src.occupant2)
|
||||
if(user == src.occupant2)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/effect/landmark/spacepod/random
|
||||
name = "spacepod spawner"
|
||||
invisibility = 101
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x"
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/landmark/spacepod/random/New()
|
||||
..()
|
||||
|
||||
#undef DAMAGE
|
||||
#undef FIRE
|
||||
Reference in New Issue
Block a user