Merge branch 'master' into RemoveSetBackground

This commit is contained in:
Jordan Brown
2018-01-10 12:37:53 -08:00
committed by GitHub
64 changed files with 2681 additions and 2255 deletions
+2 -2
View File
@@ -463,7 +463,7 @@
if("All Antags!")
survivor_probability = 100
rightandwrong(0, usr, survivor_probability)
rightandwrong(SUMMON_GUNS, usr, survivor_probability)
if("magic")
if(!check_rights(R_FUN))
@@ -476,7 +476,7 @@
if("All Antags!")
survivor_probability = 100
rightandwrong(1, usr, survivor_probability)
rightandwrong(SUMMON_MAGIC, usr, survivor_probability)
if("events")
if(!check_rights(R_FUN))
+2 -4
View File
@@ -31,7 +31,7 @@ GLOBAL_LIST_INIT(potentialRandomZlevels, generateMapList(filename = "config/away
return ..()
/proc/generateMapList(filename)
var/list/potentialMaps = list()
. = list()
var/list/Lines = world.file2list(filename)
if(!Lines.len)
@@ -58,6 +58,4 @@ GLOBAL_LIST_INIT(potentialRandomZlevels, generateMapList(filename = "config/away
if (!name)
continue
potentialMaps.Add(t)
return potentialMaps
. += t
+2 -2
View File
@@ -69,7 +69,7 @@
"name" = P.group,
"packs" = list()
)
if((P.hidden && !emagged) || (P.contraband && !contraband) || (P.special && !P.special_enabled))
if((P.hidden && !emagged) || (P.contraband && !contraband) || (P.special && !P.special_enabled) || P.DropPodOnly)
continue
data["supplies"][P.group]["packs"] += list(list(
"name" = P.name,
@@ -140,7 +140,7 @@
var/datum/supply_pack/pack = SSshuttle.supply_packs[id]
if(!istype(pack))
return
if((pack.hidden && !emagged) || (pack.contraband && !contraband))
if((pack.hidden && !emagged) || (pack.contraband && !contraband) || pack.DropPodOnly)
return
var/name = "*None Provided*"
+125
View File
@@ -0,0 +1,125 @@
/obj/machinery/computer/cargo/express
name = "express supply console"
desc = "This console allows the user to purchase a package for double the price,\
with 1/40th of the delivery time: made possible by NanoTrasen's new \"Drop Pod Railgun\".\
All sales are near instantaneous - please choose carefully"
icon_screen = "supply_express"
circuit = /obj/item/circuitboard/computer/cargo/express
blockade_warning = "Bluespace instability detected. Delivery impossible."
req_access = list(ACCESS_QM)
var/message
var/locked = TRUE
/obj/machinery/computer/cargo/express/attackby(obj/item/W, mob/living/user, params)
..()
if((istype(W, /obj/item/card/id) || istype(W, /obj/item/device/pda)) && allowed(user))
locked = !locked
to_chat(user, "<span class='notice'>You [locked ? "lock" : "unlock"] the interface.</span>")
/obj/machinery/computer/cargo/express/emag_act(mob/living/user)
if(emagged)
return
user.visible_message("<span class='warning'>[user] swipes a suspicious card through [src]!</span>",
"<span class='notice'>You change the routing protocols, allowing the Drop Pod to land anywhere on the station.</span>")
emagged = TRUE
// This also sets this on the circuit board
var/obj/item/circuitboard/computer/cargo/board = circuit
board.emagged = TRUE
/obj/machinery/computer/cargo/express/ui_interact(mob/living/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) // Remember to use the appropriate state.
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "cargo_express", name, 1000, 800, master_ui, state)
ui.open()
/obj/machinery/computer/cargo/express/ui_data(mob/user)
var/list/data = list()
data["locked"] = locked
data["siliconUser"] = user.has_unlimited_silicon_privilege
data["points"] = SSshuttle.points
data["supplies"] = list()
message = "For normally priced items, please use the standard Supply or Request Console. \
Sales are near-instantaneous - please choose carefully."
if(SSshuttle.supplyBlocked)
message = blockade_warning
if(emagged)
message = "(&!#@ERROR: ROUTING_#PROTOCOL MALF(*CT#ON. $UG%ESTE@ ACT#0N: !^/PULS3-%E)ET CIR*)ITB%ARD."
data["message"] = message
if (emagged)
for(var/pack in SSshuttle.supply_packs)
var/datum/supply_pack/P = SSshuttle.supply_packs[pack]
if (P.name == "Toy Crate")//Can only order toys if emagged. You gotta spend 10K points to crash a droppod somewhere on the station
data["supplies"][P.group] = list(
"name" = P.group,
"packs" = list()
)
data["supplies"][P.group]["packs"] += list(list(
"name" = P.name,
"cost" = P.cost * 2, //displays twice the normal cost
"id" = pack
))
else
for(var/pack in SSshuttle.supply_packs)
var/datum/supply_pack/P = SSshuttle.supply_packs[pack]
if(!data["supplies"][P.group])
data["supplies"][P.group] = list(
"name" = P.group,
"packs" = list()
)
if((P.hidden) || (P.contraband) || (P.special))//no fun allowed
continue
data["supplies"][P.group]["packs"] += list(list(
"name" = P.name,
"cost" = P.cost * 2, //displays twice the normal cost
"id" = pack
))
return data
/obj/machinery/computer/cargo/express/ui_act(action, params, datum/tgui/ui)
switch(action)
if("add")//Generate Supply Order first
var/id = text2path(params["id"])
var/datum/supply_pack/pack = SSshuttle.supply_packs[id]
if(!istype(pack))
return
var/name = "*None Provided*"
var/rank = "*None Provided*"
var/ckey = usr.ckey
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
name = H.get_authentification_name()
rank = H.get_assignment()
else if(issilicon(usr))
name = usr.real_name
rank = "Silicon"
var/reason = ""
var/datum/supply_order/SO = new(pack, name, rank, ckey, reason)
if(SO.pack.cost* 2 <= SSshuttle.points) //If you can afford it, then begin the delivery
SO.generateRequisition(get_turf(src))
SSshuttle.points -= SO.pack.cost * 2//twice the normal cost
var/list/empty_turfs = list()
var/area/landingzone
if (!emagged)
landingzone = locate(/area/quartermaster/storage) in GLOB.sortedAreas
else
landingzone = locate(pick(GLOB.the_station_areas)) in GLOB.sortedAreas
for(var/turf/open/floor/T in landingzone.contents) //get all the turfs in cargo bay
if(is_blocked_turf(T))//wont land on a blocked turf
continue
empty_turfs.Add(T)
if (empty_turfs.len != 0 )
var/LZ = empty_turfs[rand(empty_turfs.len-1)]//pick a random turf
new /obj/effect/BDPtarget(LZ, SO)//where the magic happens. this temp visual makes the actual droppod after a pause
. = TRUE
update_icon()
+1781 -1780
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -11,7 +11,7 @@
..()
/datum/round_event/wizard/summonguns/start()
rightandwrong(0,,10)
rightandwrong(SUMMON_GUNS, null, 10)
/datum/round_event_control/wizard/summonmagic //The Somewhat Less Classic
name = "Summon Magic"
@@ -26,4 +26,4 @@
..()
/datum/round_event/wizard/summonmagic/start()
rightandwrong(1,,10)
rightandwrong(SUMMON_MAGIC, null, 10)
@@ -222,7 +222,7 @@
component_parts = null
/obj/machinery/smartfridge/drying_rack/on_deconstruction()
new /obj/item/stack/sheet/mineral/wood(loc, 10)
new /obj/item/stack/sheet/mineral/wood(drop_location(), 10)
..()
/obj/machinery/smartfridge/drying_rack/RefreshParts()
@@ -297,7 +297,7 @@
update_icon()
/obj/machinery/smartfridge/drying_rack/proc/rack_dry()
for(var/obj/item/reagent_containers/food/snacks/S in contents)
for(var/obj/item/reagent_containers/food/snacks/S in src)
if(S.dried_type == S.type)//if the dried type is the same as the object's type, don't bother creating a whole new item...
S.add_atom_colour("#ad7257", FIXED_COLOUR_PRIORITY)
S.dry = TRUE
@@ -307,8 +307,8 @@
new dried(drop_location())
qdel(S)
return TRUE
for(var/obj/item/stack/sheet/wetleather/WL in contents)
var/obj/item/stack/sheet/leather/L = new(loc)
for(var/obj/item/stack/sheet/wetleather/WL in src)
var/obj/item/stack/sheet/leather/L = new(drop_location())
L.amount = WL.amount
qdel(WL)
return TRUE
+2 -2
View File
@@ -266,13 +266,13 @@
/datum/plant_gene/trait/glow/shadow
//makes plant emit slightly purple shadows
//adds -potency*(rate*0.05) light power to products
//adds -potency*(rate*0.2) light power to products
name = "Shadow Emission"
rate = 0.04
glow_color = "#AAD84B"
/datum/plant_gene/trait/glow/shadow/glow_power(obj/item/seeds/S)
return -max(S.potency*(rate*0.05), 0.075)
return -max(S.potency*(rate*0.2), 0.2)
/datum/plant_gene/trait/glow/red
name = "Red Electrical Glow"
@@ -357,6 +357,11 @@
to_chat(humanc, "<span class='userdanger'><i>THERE CAN BE ONLY ONE!!!</i></span>")
humanc.make_scottish()
if(GLOB.summon_guns_triggered)
give_guns(humanc)
if(GLOB.summon_magic_triggered)
give_magic(humanc)
GLOB.joined_player_list += character.ckey
if(CONFIG_GET(flag/allow_latejoin_antagonists) && humanc) //Borgs aren't allowed to be antags. Will need to be tweaked if we get true latejoin ais.
+1 -1
View File
@@ -198,7 +198,7 @@
else
to_chat(user, "<span class='notice'>The MMI indicates the brain is active.</span>")
/obj/item/device/mmi/relaymove()
/obj/item/device/mmi/relaymove(mob/user)
return //so that the MMI won't get a warning about not being able to move if it tries to move
/obj/item/device/mmi/syndie
@@ -1,8 +1,8 @@
/mob/living/carbon/alien/spawn_gibs(with_bodyparts)
if(with_bodyparts)
new /obj/effect/gibspawner/xeno(get_turf(src))
new /obj/effect/gibspawner/xeno(drop_location())
else
new /obj/effect/gibspawner/xenobodypartless(get_turf(src))
new /obj/effect/gibspawner/xenobodypartless(drop_location())
/mob/living/carbon/alien/gib_animation()
new /obj/effect/temp_visual/gib_animation(loc, "gibbed-a")
@@ -8,9 +8,9 @@
/mob/living/carbon/alien/larva/spawn_gibs(with_bodyparts)
if(with_bodyparts)
new /obj/effect/gibspawner/larva(get_turf(src))
new /obj/effect/gibspawner/larva(drop_location())
else
new /obj/effect/gibspawner/larvabodypartless(get_turf(src))
new /obj/effect/gibspawner/larvabodypartless(drop_location())
/mob/living/carbon/alien/larva/gib_animation()
new /obj/effect/temp_visual/gib_animation(loc, "gibbed-l")
+6 -4
View File
@@ -13,14 +13,16 @@
SSticker.mode.check_win() //Calls the rounds wincheck, mainly for wizard, malf, and changeling now
/mob/living/carbon/gib(no_brain, no_organs, no_bodyparts)
var/atom/Tsec = drop_location()
for(var/mob/M in src)
if(M in stomach_contents)
stomach_contents.Remove(M)
M.forceMove(loc)
M.forceMove(Tsec)
visible_message("<span class='danger'>[M] bursts out of [src]!</span>")
..()
/mob/living/carbon/spill_organs(no_brain, no_organs, no_bodyparts)
var/atom/Tsec = drop_location()
if(!no_bodyparts)
if(no_organs)//so the organs don't get transfered inside the bodyparts we'll drop.
for(var/X in internal_organs)
@@ -35,7 +37,7 @@
var/org_zone = check_zone(O.zone) //both groin and chest organs.
if(org_zone == "chest")
O.Remove(src)
O.forceMove(get_turf(src))
O.forceMove(Tsec)
O.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5)
else
for(var/X in internal_organs)
@@ -47,7 +49,7 @@
qdel(I)
continue
I.Remove(src)
I.forceMove(get_turf(src))
I.forceMove(Tsec)
I.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5)
@@ -55,4 +57,4 @@
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
BP.drop_limb()
BP.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5)
BP.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5)
@@ -6,9 +6,9 @@
/mob/living/carbon/human/spawn_gibs(with_bodyparts)
if(with_bodyparts)
new /obj/effect/gibspawner/human(get_turf(src), dna, get_static_viruses())
new /obj/effect/gibspawner/human(drop_location(), dna, get_static_viruses())
else
new /obj/effect/gibspawner/humanbodypartless(get_turf(src), dna, get_static_viruses())
new /obj/effect/gibspawner/humanbodypartless(drop_location(), dna, get_static_viruses())
/mob/living/carbon/human/spawn_dust(just_ash = FALSE)
if(just_ash)
@@ -25,9 +25,10 @@
create_internal_organs() //most of it is done in set_species now, this is only for parent call
handcrafting = new()
AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT), CALLBACK(src, .proc/clean_blood))
. = ..()
AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT), CALLBACK(src, .proc/clean_blood))
/mob/living/carbon/human/OpenCraftingMenu()
handcrafting.ui_interact(src)
@@ -1026,4 +1027,4 @@
race = /datum/species/zombie/infectious
/mob/living/carbon/human/species/zombie/krokodil_addict
race = /datum/species/krokodil_addict
race = /datum/species/krokodil_addict
@@ -68,7 +68,10 @@
P.firer = src
P.yo = new_y - curloc.y
P.xo = new_x - curloc.x
P.Angle = null
var/new_angle_s = P.Angle + rand(120,240)
while(new_angle_s > 180) // Translate to regular projectile degrees
new_angle_s -= 360
P.setAngle(new_angle_s)
return -1 // complete projectile permutation
+1 -1
View File
@@ -18,7 +18,7 @@
return
/mob/living/proc/spawn_gibs()
new /obj/effect/gibspawner/generic(get_turf(src), null, get_static_viruses())
new /obj/effect/gibspawner/generic(drop_location(), null, get_static_viruses())
/mob/living/proc/spill_organs()
return
+1 -1
View File
@@ -63,7 +63,7 @@
qdel(src)
return TRUE
/obj/item/clothing/head/mob_holder/relaymove()
/obj/item/clothing/head/mob_holder/relaymove(mob/user)
release()
/obj/item/clothing/head/mob_holder/container_resist()
+3 -2
View File
@@ -786,9 +786,10 @@
if(QDELETED(src))
return
if(butcher_results)
var/atom/Tsec = drop_location()
for(var/path in butcher_results)
for(var/i = 1; i <= butcher_results[path];i++)
new path(src.loc)
new path(Tsec)
butcher_results.Remove(path) //In case you want to have things like simple_animals drop their butcher results on gib, so it won't double up below.
visible_message("<span class='notice'>[user] butchers [src].</span>")
gib(0, 0, 1)
@@ -1034,7 +1035,7 @@
. = ..()
if(.)
if(client)
reset_perspective(destination)
reset_perspective()
update_canmove() //if the mob was asleep inside a container and then got forceMoved out we need to make them fall.
/mob/living/proc/update_z(new_z) // 1+ to register, null to unregister
+1 -1
View File
@@ -1,5 +1,5 @@
/mob/living/silicon/spawn_gibs()
new /obj/effect/gibspawner/robot(get_turf(src))
new /obj/effect/gibspawner/robot(drop_location())
/mob/living/silicon/spawn_dust()
new /obj/effect/decal/remains/robot(loc)
@@ -146,6 +146,10 @@
P.firer = src
P.yo = new_y - curloc.y
P.xo = new_x - curloc.x
var/new_angle_s = P.Angle + rand(120,240)
while(new_angle_s > 180) // Translate to regular projectile degrees
new_angle_s -= 360
P.setAngle(new_angle_s)
return -1 // complete projectile permutation
@@ -244,9 +244,10 @@
/mob/living/simple_animal/gib()
if(butcher_results)
var/atom/Tsec = drop_location()
for(var/path in butcher_results)
for(var/i = 1; i <= butcher_results[path];i++)
new path(src.loc)
new path(Tsec)
..()
/mob/living/simple_animal/gib_animation()
+5 -1
View File
@@ -150,6 +150,10 @@
if(!disabilities[disability])
return
if(!sources) // No defined source cures the disability entirely.
disabilities -= disability
return
if(!islist(sources))
sources = list(sources)
@@ -212,4 +216,4 @@
if(!has_disability(DISABILITY_HUSK))
status_flags |= DISFIGURED //makes them unknown
update_body()
add_disability(DISABILITY_HUSK, source)
add_disability(DISABILITY_HUSK, source)
+5 -2
View File
@@ -18,12 +18,14 @@
dissipate_delay = 5
dissipate_strength = 1
var/list/orbiting_balls = list()
var/miniball = FALSE
var/produced_power
var/energy_to_raise = 32
var/energy_to_lower = -20
/obj/singularity/energy_ball/Initialize(mapload, starting_energy = 50, is_miniball = FALSE)
. = ..()
miniball = is_miniball
if(!is_miniball)
set_light(10, 7, "#EEEEFF")
@@ -42,10 +44,11 @@
. = ..()
/obj/singularity/energy_ball/admin_investigate_setup()
if(istype(loc, /obj/singularity/energy_ball))
return
if(miniball)
return //don't annnounce miniballs
..()
/obj/singularity/energy_ball/process()
if(!orbiting)
handle_energy()
+9 -5
View File
@@ -86,14 +86,18 @@
return
if(user.transferItemToLoc(A, src))
to_chat(user, "<span class='notice'>You screw [S] onto [src].</span>")
suppressed = A
S.oldsound = fire_sound
fire_sound = 'sound/weapons/gunshot_silenced.ogg'
w_class += A.w_class //so pistols do not fit in pockets when suppressed
update_icon()
install_suppressor(A)
return
return 0
/obj/item/gun/ballistic/proc/install_suppressor(obj/item/suppressor/S)
// this proc assumes that the suppressor is already inside src
suppressed = S
S.oldsound = fire_sound
fire_sound = 'sound/weapons/gunshot_silenced.ogg'
w_class += S.w_class //so pistols do not fit in pockets when suppressed
update_icon()
/obj/item/gun/ballistic/attack_hand(mob/user)
if(loc == user)
if(suppressed && can_unsuppress)
@@ -12,7 +12,11 @@
/obj/item/gun/ballistic/automatic/pistol/update_icon()
..()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
return
/obj/item/gun/ballistic/automatic/pistol/suppressed/Initialize(mapload)
. = ..()
var/obj/item/suppressor/S = new(src)
install_suppressor(S)
/obj/item/gun/ballistic/automatic/pistol/m1911
name = "\improper M1911"
@@ -194,7 +194,7 @@
id = "cargorequest"
build_path = /obj/item/circuitboard/computer/cargo/request
category = list("Computer Boards")
/datum/design/board/stockexchange
name = "Computer Design (Stock Exchange Console)"
desc = "Allows for the construction of circuit boards used to build a Stock Exchange Console."
@@ -2,6 +2,16 @@
/////////////////////////////////////////
/////////////////Mining//////////////////
/////////////////////////////////////////
/datum/design/cargo_express
name = "Computer Design (Express Supply Console)"//shes beautiful
desc = "Allows for the construction of circuit boards used to build an Express Supply Console."//who?
id = "cargoexpress"//the coder reading this
build_type = PROTOLATHE
materials = list(MAT_GLASS = 1000)
reagents_list = list("sacid" = 20)
build_path = /obj/item/circuitboard/computer/cargo/express
category = list("Mining Designs")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
/datum/design/drill
name = "Mining Drill"
+1 -1
View File
@@ -424,7 +424,7 @@
display_name = "Mining Technology"
description = "Better than Efficiency V."
prereq_ids = list("engineering")
design_ids = list("drill", "superresonator", "triggermod", "damagemod", "cooldownmod", "rangemod", "ore_redemption", "mining_equipment_vendor")
design_ids = list("drill", "superresonator", "triggermod", "damagemod", "cooldownmod", "rangemod", "ore_redemption", "mining_equipment_vendor", "cargoexpress")//e a r l y g a m e)
research_cost = 2500
export_price = 10000
+171 -201
View File
@@ -1,210 +1,178 @@
//In this file: Summon Magic/Summon Guns/Summon Events
/proc/rightandwrong(summon_type, mob/user, survivor_probability) //0 = Summon Guns, 1 = Summon Magic
var/list/gunslist = list("taser","gravgun","egun","laser","revolver","detective","c20r","nuclear","deagle","gyrojet","pulse","suppressed","cannon","doublebarrel","shotgun","combatshotgun","bulldog","mateba","sabr","crossbow","saw","car","boltaction","speargun","arg","uzi","alienpistol","dragnet","turret","pulsecarbine","decloner","mindflayer","hyperkinetic","advplasmacutter","wormhole","wt550","bulldog","grenadelauncher","goldenrevolver","sniper","medibeam","scatterbeam")
var/list/magiclist = list("fireball","smoke","blind","mindswap","forcewall","knock","horsemask","charge", "summonitem", "wandnothing", "wanddeath", "wandresurrection", "wandpolymorph", "wandteleport", "wanddoor", "wandfireball", "staffchange", "staffhealing", "armor", "scrying","staffdoor","voodoo", "whistle", "battlemage", "immortality", "ghostsword", "special")
var/list/magicspeciallist = list("staffchange","staffanimation", "wandbelt", "contract", "staffchaos", "necromantic", "bloodcontract")
// 1 in 50 chance of getting something really special.
#define SPECIALIST_MAGIC_PROB 2
GLOBAL_LIST_INIT(summoned_guns, list(
/obj/item/gun/energy/e_gun/advtaser,
/obj/item/gun/energy/e_gun,
/obj/item/gun/energy/laser,
/obj/item/gun/ballistic/revolver,
/obj/item/gun/ballistic/revolver/detective,
/obj/item/gun/ballistic/automatic/pistol/deagle/camo,
/obj/item/gun/ballistic/automatic/gyropistol,
/obj/item/gun/energy/pulse,
/obj/item/gun/ballistic/automatic/pistol/suppressed,
/obj/item/gun/ballistic/revolver/doublebarrel,
/obj/item/gun/ballistic/shotgun,
/obj/item/gun/ballistic/shotgun/automatic/combat,
/obj/item/gun/ballistic/automatic/ar,
/obj/item/gun/ballistic/revolver/mateba,
/obj/item/gun/ballistic/shotgun/boltaction,
/obj/item/gun/ballistic/automatic/speargun,
/obj/item/gun/ballistic/automatic/mini_uzi,
/obj/item/gun/energy/lasercannon,
/obj/item/gun/energy/kinetic_accelerator/crossbow/large,
/obj/item/gun/energy/e_gun/nuclear,
/obj/item/gun/ballistic/automatic/proto,
/obj/item/gun/ballistic/automatic/shotgun/bulldog,
/obj/item/gun/ballistic/automatic/c20r,
/obj/item/gun/ballistic/automatic/l6_saw,
/obj/item/gun/ballistic/automatic/m90,
/obj/item/gun/energy/alien,
/obj/item/gun/energy/e_gun/dragnet,
/obj/item/gun/energy/e_gun/turret,
/obj/item/gun/energy/pulse/carbine,
/obj/item/gun/energy/decloner,
/obj/item/gun/energy/mindflayer,
/obj/item/gun/energy/kinetic_accelerator,
/obj/item/gun/energy/plasmacutter/adv,
/obj/item/gun/energy/wormhole_projector,
/obj/item/gun/ballistic/automatic/wt550,
/obj/item/gun/ballistic/automatic/shotgun,
/obj/item/gun/ballistic/revolver/grenadelauncher,
/obj/item/gun/ballistic/revolver/golden,
/obj/item/gun/ballistic/automatic/sniper_rifle,
/obj/item/gun/medbeam,
/obj/item/gun/energy/laser/scatter,
/obj/item/gun/energy/gravity_gun))
GLOBAL_LIST_INIT(summoned_magic, list(
/obj/item/spellbook/oneuse/fireball,
/obj/item/spellbook/oneuse/smoke,
/obj/item/spellbook/oneuse/blind,
/obj/item/spellbook/oneuse/mindswap,
/obj/item/spellbook/oneuse/forcewall,
/obj/item/spellbook/oneuse/knock,
/obj/item/spellbook/oneuse/barnyard,
/obj/item/spellbook/oneuse/charge,
/obj/item/spellbook/oneuse/summonitem,
/obj/item/gun/magic/wand,
/obj/item/gun/magic/wand/death,
/obj/item/gun/magic/wand/resurrection,
/obj/item/gun/magic/wand/polymorph,
/obj/item/gun/magic/wand/teleport,
/obj/item/gun/magic/wand/door,
/obj/item/gun/magic/wand/fireball,
/obj/item/gun/magic/staff/healing,
/obj/item/gun/magic/staff/door,
/obj/item/scrying,
/obj/item/voodoo,
/obj/item/warpwhistle,
/obj/item/clothing/suit/space/hardsuit/shielded/wizard,
/obj/item/device/immortality_talisman,
/obj/item/melee/ghost_sword))
GLOBAL_LIST_INIT(summoned_special_magic, list(
/obj/item/gun/magic/staff/change,
/obj/item/gun/magic/staff/animate,
/obj/item/storage/belt/wands/full,
/obj/item/antag_spawner/contract,
/obj/item/gun/magic/staff/chaos,
/obj/item/device/necromantic_stone,
/obj/item/blood_contract))
// If true, it's the probability of triggering "survivor" antag.
GLOBAL_VAR_INIT(summon_guns_triggered, FALSE)
GLOBAL_VAR_INIT(summon_magic_triggered, FALSE)
/proc/give_guns(mob/living/carbon/human/H)
if(H.stat == DEAD || !(H.client))
return
if(H.mind)
if(iswizard(H) || H.mind.special_role == "survivalist")
return
if(prob(GLOB.summon_guns_triggered) && !(H.mind in SSticker.mode.traitors))
SSticker.mode.traitors += H.mind
var/datum/objective/steal_five_of_type/summon_guns/guns = new
guns.owner = H.mind
H.mind.objectives += guns
H.mind.special_role = "survivalist"
H.mind.add_antag_datum(/datum/antagonist/auto_custom)
to_chat(H, "<B>You are the survivalist! Your own safety matters above all else, and the only way to ensure your safety is to stockpile weapons! Grab as many guns as possible, by any means necessary. Kill anyone who gets in your way.</B>")
var/datum/objective/survive/survive = new
survive.owner = H.mind
H.mind.objectives += survive
H.log_message("<font color='red'>Was made into a survivalist, and trusts no one!</font>", INDIVIDUAL_ATTACK_LOG)
H.mind.announce_objectives()
var/gun_type = pick(GLOB.summoned_guns)
var/obj/item/gun/G = new gun_type(get_turf(H))
G.unlock()
playsound(get_turf(H),'sound/magic/summon_guns.ogg', 50, 1)
var/in_hand = H.put_in_hands(G) // not always successful
to_chat(H, "<span class='warning'>\A [G] appears [in_hand ? "in your hand" : "at your feet"]!</span>")
/proc/give_magic(mob/living/carbon/human/H)
if(H.stat == DEAD || !(H.client))
return
if(H.mind)
if(iswizard(H) || H.mind.special_role == "survivalist")
return
if(prob(GLOB.summon_magic_triggered) && !(H.mind in SSticker.mode.traitors))
var/datum/objective/steal_five_of_type/summon_magic/magic = new
magic.owner = H.mind
H.mind.objectives += magic
H.mind.special_role = "amateur magician"
H.mind.add_antag_datum(/datum/antagonist/auto_custom)
to_chat(H, "<B>You are the amateur magician! Grow your newfound talent! Grab as many magical artefacts as possible, by any means necessary. Kill anyone who gets in your way.</B>")
var/datum/objective/survive/survive = new
survive.owner = H.mind
H.mind.objectives += survive
H.log_message("<font color='red'>Was made into a survivalist, and trusts no one!</font>", INDIVIDUAL_ATTACK_LOG)
H.mind.announce_objectives()
var/magic_type = pick(GLOB.summoned_magic)
var/lucky = FALSE
if(prob(SPECIALIST_MAGIC_PROB))
magic_type = pick(GLOB.summoned_special_magic)
lucky = TRUE
var/obj/item/M = new magic_type(get_turf(H))
playsound(get_turf(H),'sound/magic/summon_magic.ogg', 50, 1)
var/in_hand = H.put_in_hands(M)
to_chat(H, "<span class='warning'>\A [M] appears [in_hand ? "in your hand" : "at your feet"]!</span>")
if(lucky)
to_chat(H, "<span class='notice'>You feel incredibly lucky.</span>")
/proc/rightandwrong(summon_type, mob/user, survivor_probability)
if(user) //in this case either someone holding a spellbook or a badmin
to_chat(user, "<B>You summoned [summon_type ? "magic" : "guns"]!</B>")
message_admins("[key_name_admin(user, 1)] summoned [summon_type ? "magic" : "guns"]!")
log_game("[key_name(user)] summoned [summon_type ? "magic" : "guns"]!")
to_chat(user, "<span class='warning'>You summoned [summon_type]!</span>")
message_admins("[key_name_admin(user, 1)] summoned [summon_type]!")
log_game("[key_name(user)] summoned [summon_type]!")
if(summon_type == SUMMON_MAGIC)
GLOB.summon_magic_triggered = survivor_probability
else if(summon_type == SUMMON_GUNS)
GLOB.summon_guns_triggered = survivor_probability
else
CRASH("Bad summon_type given: [summon_type]")
for(var/mob/living/carbon/human/H in GLOB.player_list)
if(H.stat == DEAD || !(H.client))
continue
if(H.mind)
if(iswizard(H) || H.mind.special_role == "survivalist")
continue
if(prob(survivor_probability) && !(H.mind in SSticker.mode.traitors))
SSticker.mode.traitors += H.mind
if(!summon_type)
var/datum/objective/steal_five_of_type/summon_guns/guns = new
guns.owner = H.mind
H.mind.objectives += guns
H.mind.special_role = "survivalist"
H.mind.add_antag_datum(/datum/antagonist/auto_custom)
to_chat(H, "<B>You are the survivalist! Your own safety matters above all else, and the only way to ensure your safety is to stockpile weapons! Grab as many guns as possible, by any means necessary. Kill anyone who gets in your way.</B>")
else
var/datum/objective/steal_five_of_type/summon_magic/magic = new
magic.owner = H.mind
H.mind.objectives += magic
H.mind.special_role = "amateur magician"
H.mind.add_antag_datum(/datum/antagonist/auto_custom)
to_chat(H, "<B>You are the amateur magician! Grow your newfound talent! Grab as many magical artefacts as possible, by any means necessary. Kill anyone who gets in your way.</B>")
var/datum/objective/survive/survive = new
survive.owner = H.mind
H.mind.objectives += survive
H.log_message("<font color='red'>Was made into a survivalist, and trusts no one!</font>", INDIVIDUAL_ATTACK_LOG)
H.mind.announce_objectives()
var/randomizeguns = pick(gunslist)
var/randomizemagic = pick(magiclist)
var/randomizemagicspecial = pick(magicspeciallist)
if(!summon_type)
var/obj/item/gun/G
switch (randomizeguns)
if("taser")
G = new /obj/item/gun/energy/e_gun/advtaser(get_turf(H))
if("egun")
G = new /obj/item/gun/energy/e_gun(get_turf(H))
if("laser")
G = new /obj/item/gun/energy/laser(get_turf(H))
if("revolver")
G = new /obj/item/gun/ballistic/revolver(get_turf(H))
if("detective")
G = new /obj/item/gun/ballistic/revolver/detective(get_turf(H))
if("deagle")
G = new /obj/item/gun/ballistic/automatic/pistol/deagle/camo(get_turf(H))
if("gyrojet")
G = new /obj/item/gun/ballistic/automatic/gyropistol(get_turf(H))
if("pulse")
G = new /obj/item/gun/energy/pulse(get_turf(H))
if("suppressed")
G = new /obj/item/gun/ballistic/automatic/pistol(get_turf(H))
new /obj/item/suppressor(get_turf(H))
if("doublebarrel")
G = new /obj/item/gun/ballistic/revolver/doublebarrel(get_turf(H))
if("shotgun")
G = new /obj/item/gun/ballistic/shotgun(get_turf(H))
if("combatshotgun")
G = new /obj/item/gun/ballistic/shotgun/automatic/combat(get_turf(H))
if("arg")
G = new /obj/item/gun/ballistic/automatic/ar(get_turf(H))
if("mateba")
G = new /obj/item/gun/ballistic/revolver/mateba(get_turf(H))
if("boltaction")
G = new /obj/item/gun/ballistic/shotgun/boltaction(get_turf(H))
if("speargun")
G = new /obj/item/gun/ballistic/automatic/speargun(get_turf(H))
if("uzi")
G = new /obj/item/gun/ballistic/automatic/mini_uzi(get_turf(H))
if("cannon")
G = new /obj/item/gun/energy/lasercannon(get_turf(H))
if("crossbow")
G = new /obj/item/gun/energy/kinetic_accelerator/crossbow/large(get_turf(H))
if("nuclear")
G = new /obj/item/gun/energy/e_gun/nuclear(get_turf(H))
if("sabr")
G = new /obj/item/gun/ballistic/automatic/proto(get_turf(H))
if("bulldog")
G = new /obj/item/gun/ballistic/automatic/shotgun/bulldog(get_turf(H))
if("c20r")
G = new /obj/item/gun/ballistic/automatic/c20r(get_turf(H))
if("saw")
G = new /obj/item/gun/ballistic/automatic/l6_saw(get_turf(H))
if("car")
G = new /obj/item/gun/ballistic/automatic/m90(get_turf(H))
if("alienpistol")
G = new /obj/item/gun/energy/alien(get_turf(H))
if("dragnet")
G = new /obj/item/gun/energy/e_gun/dragnet(get_turf(H))
if("turret")
G = new /obj/item/gun/energy/e_gun/turret(get_turf(H))
if("pulsecarbine")
G = new /obj/item/gun/energy/pulse/carbine(get_turf(H))
if("decloner")
G = new /obj/item/gun/energy/decloner(get_turf(H))
if("mindflayer")
G = new /obj/item/gun/energy/mindflayer(get_turf(H))
if("hyperkinetic")
G = new /obj/item/gun/energy/kinetic_accelerator(get_turf(H))
if("advplasmacutter")
G = new /obj/item/gun/energy/plasmacutter/adv(get_turf(H))
if("wormhole")
G = new /obj/item/gun/energy/wormhole_projector(get_turf(H))
if("wt550")
G = new /obj/item/gun/ballistic/automatic/wt550(get_turf(H))
if("bulldog")
G = new /obj/item/gun/ballistic/automatic/shotgun(get_turf(H))
if("grenadelauncher")
G = new /obj/item/gun/ballistic/revolver/grenadelauncher(get_turf(H))
if("goldenrevolver")
G = new /obj/item/gun/ballistic/revolver/golden(get_turf(H))
if("sniper")
G = new /obj/item/gun/ballistic/automatic/sniper_rifle(get_turf(H))
if("medibeam")
G = new /obj/item/gun/medbeam(get_turf(H))
if("scatterbeam")
G = new /obj/item/gun/energy/laser/scatter(get_turf(H))
if("gravgun")
G = new /obj/item/gun/energy/gravity_gun(get_turf(H))
G.unlock()
playsound(get_turf(H),'sound/magic/summon_guns.ogg', 50, 1)
if(summon_type == SUMMON_MAGIC)
give_magic(H)
else
switch (randomizemagic)
if("fireball")
new /obj/item/spellbook/oneuse/fireball(get_turf(H))
if("smoke")
new /obj/item/spellbook/oneuse/smoke(get_turf(H))
if("blind")
new /obj/item/spellbook/oneuse/blind(get_turf(H))
if("mindswap")
new /obj/item/spellbook/oneuse/mindswap(get_turf(H))
if("forcewall")
new /obj/item/spellbook/oneuse/forcewall(get_turf(H))
if("knock")
new /obj/item/spellbook/oneuse/knock(get_turf(H))
if("horsemask")
new /obj/item/spellbook/oneuse/barnyard(get_turf(H))
if("charge")
new /obj/item/spellbook/oneuse/charge(get_turf(H))
if("summonitem")
new /obj/item/spellbook/oneuse/summonitem(get_turf(H))
if("wandnothing")
new /obj/item/gun/magic/wand(get_turf(H))
if("wanddeath")
new /obj/item/gun/magic/wand/death(get_turf(H))
if("wandresurrection")
new /obj/item/gun/magic/wand/resurrection(get_turf(H))
if("wandpolymorph")
new /obj/item/gun/magic/wand/polymorph(get_turf(H))
if("wandteleport")
new /obj/item/gun/magic/wand/teleport(get_turf(H))
if("wanddoor")
new /obj/item/gun/magic/wand/door(get_turf(H))
if("wandfireball")
new /obj/item/gun/magic/wand/fireball(get_turf(H))
if("staffhealing")
new /obj/item/gun/magic/staff/healing(get_turf(H))
if("staffdoor")
new /obj/item/gun/magic/staff/door(get_turf(H))
if("armor")
new /obj/item/clothing/suit/space/hardsuit/wizard(get_turf(H))
if("scrying")
new /obj/item/scrying(get_turf(H))
if (!(H.dna.check_mutation(XRAY)))
H.dna.add_mutation(XRAY)
to_chat(H, "<span class='notice'>The walls suddenly disappear.</span>")
if("voodoo")
new /obj/item/voodoo(get_turf(H))
if("whistle")
new /obj/item/warpwhistle(get_turf(H))
if("battlemage")
new /obj/item/clothing/suit/space/hardsuit/shielded/wizard(get_turf(H))
if("immortality")
new /obj/item/device/immortality_talisman(get_turf(H))
if("ghostsword")
new /obj/item/melee/ghost_sword(get_turf(H))
if("special")
magiclist -= "special" //only one super OP item per summoning max
switch (randomizemagicspecial)
if("staffchange")
new /obj/item/gun/magic/staff/change(get_turf(H))
if("staffanimation")
new /obj/item/gun/magic/staff/animate(get_turf(H))
if("wandbelt")
new /obj/item/storage/belt/wands/full(get_turf(H))
if("contract")
new /obj/item/antag_spawner/contract(get_turf(H))
if("staffchaos")
new /obj/item/gun/magic/staff/chaos(get_turf(H))
if("necromantic")
new /obj/item/device/necromantic_stone(get_turf(H))
if("bloodcontract")
new /obj/item/blood_contract(get_turf(H))
to_chat(H, "<span class='notice'>You suddenly feel lucky.</span>")
playsound(get_turf(H),'sound/magic/summon_magic.ogg', 50, 1)
give_guns(H)
/proc/summonevents()
if(!SSevents.wizardmode)
@@ -221,3 +189,5 @@
SSevents.reschedule()
message_admins("Summon Events intensifies, events will now occur every [SSevents.frequency_lower / 600] to [SSevents.frequency_upper / 600] minutes.")
log_game("Summon Events was increased!")
#undef SPECIALIST_MAGIC_PROB
@@ -82,7 +82,7 @@
/obj/item/bodypart/proc/drop_limb(special)
if(!owner)
return
var/turf/T = get_turf(owner)
var/atom/Tsec = owner.drop_location()
var/mob/living/carbon/C = owner
update_limb(1)
C.bodyparts -= src
@@ -126,7 +126,7 @@
C.update_hair()
C.update_canmove()
if(!T) // T = null happens when a "dummy human" used for rendering icons on prefs screen gets its limbs replaced.
if(!Tsec) // Tsec = null happens when a "dummy human" used for rendering icons on prefs screen gets its limbs replaced.
qdel(src)
return
@@ -135,7 +135,7 @@
qdel(src)
return
forceMove(T)
forceMove(Tsec)
@@ -167,7 +167,7 @@
..()
if(C && !special)
if(C.handcuffed)
C.handcuffed.forceMove(C.loc)
C.handcuffed.forceMove(drop_location())
C.handcuffed.dropped(C)
C.handcuffed = null
C.update_handcuffed()
@@ -185,7 +185,7 @@
..()
if(C && !special)
if(C.handcuffed)
C.handcuffed.forceMove(C.loc)
C.handcuffed.forceMove(drop_location())
C.handcuffed.dropped(C)
C.handcuffed = null
C.update_handcuffed()
@@ -201,7 +201,7 @@
/obj/item/bodypart/r_leg/drop_limb(special)
if(owner && !special)
if(owner.legcuffed)
owner.legcuffed.forceMove(owner.loc)
owner.legcuffed.forceMove(drop_location())
owner.legcuffed.dropped(owner)
owner.legcuffed = null
owner.update_inv_legcuffed()
@@ -212,7 +212,7 @@
/obj/item/bodypart/l_leg/drop_limb(special) //copypasta
if(owner && !special)
if(owner.legcuffed)
owner.legcuffed.forceMove(owner.loc)
owner.legcuffed.forceMove(drop_location())
owner.legcuffed.dropped(owner)
owner.legcuffed = null
owner.update_inv_legcuffed()