mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
Merge remote-tracking branch 'refs/remotes/ParadiseSS13/master'
This commit is contained in:
@@ -1,139 +0,0 @@
|
||||
/*
|
||||
CONTAINS:
|
||||
THAT STUPID GAME KIT
|
||||
|
||||
*/
|
||||
/obj/item/weapon/game_kit/New()
|
||||
src.board_stat = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
|
||||
src.selected = "CR"
|
||||
|
||||
/obj/item/weapon/game_kit/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/item/weapon/game_kit/MouseDrop(mob/user as mob)
|
||||
if (user == usr && !usr.restrained() && !usr.stat && (usr.contents.Find(src) || in_range(src, usr)))
|
||||
if (usr.hand)
|
||||
if (!usr.l_hand)
|
||||
spawn (0)
|
||||
src.attack_hand(usr, 1, 1)
|
||||
else
|
||||
if (!usr.r_hand)
|
||||
spawn (0)
|
||||
src.attack_hand(usr, 0, 1)
|
||||
|
||||
/obj/item/weapon/game_kit/proc/update()
|
||||
var/dat = text("<CENTER><B>Game Board</B></CENTER><BR><a href='?src=\ref[];mode=hia'>[]</a> <a href='?src=\ref[];mode=remove'>remove</a><HR><table width= 256 border= 0 height= 256 cellspacing= 0 cellpadding= 0 >", src, (src.selected ? text("Selected: []", src.selected) : "Nothing Selected"), src)
|
||||
for (var/y = 1 to 8)
|
||||
dat += "<tr>"
|
||||
|
||||
for (var/x = 1 to 8)
|
||||
var/color = (y + x) % 2 ? "#ffffff" : "#999999"
|
||||
var/piece = copytext(src.board_stat, ((y - 1) * 8 + x) * 2 - 1, ((y - 1) * 8 + x) * 2 + 1)
|
||||
|
||||
dat += "<td>"
|
||||
dat += "<td style='background-color:[color]' width=32 height=32>"
|
||||
if (piece != "BB")
|
||||
dat += "<a href='?src=\ref[src];s_board=[x] [y]'><img src='[src.base_url]/board_[piece].png' width=32 height=32 border=0>"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];s_board=[x] [y]'><img src='[src.base_url]/board_none.png' width=32 height=32 border=0>"
|
||||
dat += "</td>"
|
||||
|
||||
dat += "</tr>"
|
||||
|
||||
dat += "</table><HR><B>Chips:</B><BR>"
|
||||
for (var/piece in list("CB", "CR"))
|
||||
dat += "<a href='?src=\ref[src];s_piece=[piece]'><img src='[src.base_url]/board_[piece].png' width=32 height=32 border=0></a>"
|
||||
|
||||
dat += "<HR><B>Chess pieces:</B><BR>"
|
||||
for (var/piece in list("WP", "WK", "WQ", "WI", "WN", "WR"))
|
||||
dat += "<a href='?src=\ref[src];s_piece=[piece]'><img src='[src.base_url]/board_[piece].png' width=32 height=32 border=0></a>"
|
||||
dat += "<br>"
|
||||
for (var/piece in list("BP", "BK", "BQ", "BI", "BN", "BR"))
|
||||
dat += "<a href='?src=\ref[src];s_piece=[piece]'><img src='[src.base_url]/board_[piece].png' width=32 height=32 border=0></a>"
|
||||
src.data = dat
|
||||
|
||||
/obj/item/weapon/game_kit/attack_ai(mob/user as mob, unused, flag)
|
||||
return src.attack_hand(user, unused, flag)
|
||||
|
||||
/obj/item/weapon/game_kit/attack_hand(mob/user as mob, unused, flag)
|
||||
|
||||
if (flag)
|
||||
return ..()
|
||||
else
|
||||
user.machine = src
|
||||
if (!( src.data ))
|
||||
update()
|
||||
user << browse(src.data, "window=game_kit")
|
||||
onclose(user, "game_kit")
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/game_kit/Topic(href, href_list)
|
||||
..()
|
||||
if ((usr.stat || usr.restrained()))
|
||||
return
|
||||
|
||||
if (usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)))
|
||||
if (href_list["s_piece"])
|
||||
src.selected = href_list["s_piece"]
|
||||
else if (href_list["mode"])
|
||||
if (href_list["mode"] == "remove")
|
||||
src.selected = "remove"
|
||||
else
|
||||
src.selected = null
|
||||
else if (href_list["s_board"])
|
||||
if (!( src.selected ))
|
||||
src.selected = href_list["s_board"]
|
||||
else
|
||||
var/tx = text2num(copytext(href_list["s_board"], 1, 2))
|
||||
var/ty = text2num(copytext(href_list["s_board"], 3, 4))
|
||||
if ((copytext(src.selected, 2, 3) == " " && length(src.selected) == 3))
|
||||
var/sx = text2num(copytext(src.selected, 1, 2))
|
||||
var/sy = text2num(copytext(src.selected, 3, 4))
|
||||
var/place = ((sy - 1) * 8 + sx) * 2 - 1
|
||||
src.selected = copytext(src.board_stat, place, place + 2)
|
||||
if (place == 1)
|
||||
src.board_stat = text("BB[]", copytext(src.board_stat, 3, 129))
|
||||
else
|
||||
if (place == 127)
|
||||
src.board_stat = text("[]BB", copytext(src.board_stat, 1, 127))
|
||||
else
|
||||
if (place)
|
||||
src.board_stat = text("[]BB[]", copytext(src.board_stat, 1, place), copytext(src.board_stat, place + 2, 129))
|
||||
place = ((ty - 1) * 8 + tx) * 2 - 1
|
||||
if (place == 1)
|
||||
src.board_stat = text("[][]", src.selected, copytext(src.board_stat, 3, 129))
|
||||
else
|
||||
if (place == 127)
|
||||
src.board_stat = text("[][]", copytext(src.board_stat, 1, 127), src.selected)
|
||||
else
|
||||
if (place)
|
||||
src.board_stat = text("[][][]", copytext(src.board_stat, 1, place), src.selected, copytext(src.board_stat, place + 2, 129))
|
||||
src.selected = null
|
||||
else
|
||||
if (src.selected == "remove")
|
||||
var/place = ((ty - 1) * 8 + tx) * 2 - 1
|
||||
if (place == 1)
|
||||
src.board_stat = text("BB[]", copytext(src.board_stat, 3, 129))
|
||||
else
|
||||
if (place == 127)
|
||||
src.board_stat = text("[]BB", copytext(src.board_stat, 1, 127))
|
||||
else
|
||||
if (place)
|
||||
src.board_stat = text("[]BB[]", copytext(src.board_stat, 1, place), copytext(src.board_stat, place + 2, 129))
|
||||
else
|
||||
if (length(src.selected) == 2)
|
||||
var/place = ((ty - 1) * 8 + tx) * 2 - 1
|
||||
if (place == 1)
|
||||
src.board_stat = text("[][]", src.selected, copytext(src.board_stat, 3, 129))
|
||||
else
|
||||
if (place == 127)
|
||||
src.board_stat = text("[][]", copytext(src.board_stat, 1, 127), src.selected)
|
||||
else
|
||||
if (place)
|
||||
src.board_stat = text("[][][]", copytext(src.board_stat, 1, place), src.selected, copytext(src.board_stat, place + 2, 129))
|
||||
src.add_fingerprint(usr)
|
||||
update()
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
@@ -1,71 +0,0 @@
|
||||
/obj/item/robot_parts/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
|
||||
var/limbloc = null
|
||||
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/stool/bed/roller, M.loc) && (M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || (locate(/obj/structure/table/, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66))))
|
||||
return ..()
|
||||
|
||||
if(!istype(M, /mob/living/carbon/human))
|
||||
return ..()
|
||||
|
||||
if((user.zone_sel.selecting == "l_arm") && (istype(src, /obj/item/robot_parts/l_arm)))
|
||||
limbloc = "l_hand"
|
||||
else if((user.zone_sel.selecting == "r_arm") && (istype(src, /obj/item/robot_parts/r_arm)))
|
||||
limbloc = "r_hand"
|
||||
else if((user.zone_sel.selecting == "r_leg") && (istype(src, /obj/item/robot_parts/r_leg)))
|
||||
limbloc = "r_foot"
|
||||
else if((user.zone_sel.selecting == "l_leg") && (istype(src, /obj/item/robot_parts/l_leg)))
|
||||
limbloc = "l_foot"
|
||||
else
|
||||
user << "\red That doesn't fit there!"
|
||||
return ..()
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
|
||||
if(S.status & ORGAN_DESTROYED)
|
||||
if(!(S.status & ORGAN_ATTACHABLE))
|
||||
user << "\red The wound is not ready for a replacement!"
|
||||
return 0
|
||||
if(M != user)
|
||||
M.visible_message( \
|
||||
"\red [user] is beginning to attach \the [src] where [H]'s [S.display_name] used to be.", \
|
||||
"\red [user] begins to attach \the [src] where your [S.display_name] used to be.")
|
||||
else
|
||||
M.visible_message( \
|
||||
"\red [user] begins to attach a robotic limb where \his [S.display_name] used to be with [src].", \
|
||||
"\red You begin to attach \the [src] where your [S.display_name] used to be.")
|
||||
|
||||
if(do_mob(user, H, 100))
|
||||
if(M != user)
|
||||
M.visible_message( \
|
||||
"\red [user] finishes attaching [H]'s new [S.display_name].", \
|
||||
"\red [user] finishes attaching your new [S.display_name].")
|
||||
else
|
||||
M.visible_message( \
|
||||
"\red [user] finishes attaching \his new [S.display_name].", \
|
||||
"\red You finish attaching your new [S.display_name].")
|
||||
|
||||
if(H == user && prob(25))
|
||||
user << "\red You mess up!"
|
||||
S.take_damage(15)
|
||||
|
||||
S.status &= ~ORGAN_BROKEN
|
||||
S.status &= ~ORGAN_SPLINTED
|
||||
S.status &= ~ORGAN_ATTACHABLE
|
||||
S.status &= ~ORGAN_DESTROYED
|
||||
S.status |= ORGAN_ROBOT
|
||||
var/datum/organ/external/T = H.organs["[limbloc]"]
|
||||
T.status &= ~ORGAN_BROKEN
|
||||
T.status &= ~ORGAN_SPLINTED
|
||||
T.status &= ~ORGAN_ATTACHABLE
|
||||
T.status &= ~ORGAN_DESTROYED
|
||||
T.status |= ORGAN_ROBOT
|
||||
H.update_body()
|
||||
M.updatehealth()
|
||||
M.UpdateDamageIcon()
|
||||
del(src)
|
||||
|
||||
return 1
|
||||
return 0
|
||||
@@ -1,84 +0,0 @@
|
||||
/obj/item/weapon/syndie
|
||||
icon = 'icons/obj/syndieweapons.dmi'
|
||||
|
||||
/*C-4 explosive charge and etc, replaces the old syndie transfer valve bomb.*/
|
||||
|
||||
|
||||
/*The explosive charge itself. Flashes for five seconds before exploding.*/
|
||||
|
||||
/obj/item/weapon/syndie/c4explosive
|
||||
icon_state = "c-4small_0"
|
||||
item_state = "c-4small"
|
||||
name = "normal-sized package"
|
||||
desc = "A small wrapped package."
|
||||
w_class = 3
|
||||
|
||||
var/power = 1 /*Size of the explosion.*/
|
||||
var/size = "small" /*Used for the icon, this one will make c-4small_0 for the off state.*/
|
||||
|
||||
/obj/item/weapon/syndie/c4explosive/heavy
|
||||
icon_state = "c-4large_0"
|
||||
item_state = "c-4large"
|
||||
desc = "A mysterious package, it's quite heavy."
|
||||
power = 2
|
||||
size = "large"
|
||||
|
||||
/obj/item/weapon/syndie/c4explosive/New()
|
||||
var/K = rand(1,2000)
|
||||
K = md5(num2text(K)+name)
|
||||
K = copytext(K,1,7)
|
||||
src.desc += "\n You see [K] engraved on \the [src]."
|
||||
var/obj/item/weapon/syndie/c4detonator/detonator = new(src.loc)
|
||||
detonator.desc += "\n You see [K] engraved on the lighter."
|
||||
detonator.bomb = src
|
||||
|
||||
/obj/item/weapon/syndie/c4explosive/proc/detonate()
|
||||
icon_state = "c-4[size]_1"
|
||||
spawn(50)
|
||||
explosion(get_turf(src), power, power*2, power*3, power*4, power*4)
|
||||
for(var/dirn in cardinal) //This is to guarantee that C4 at least breaks down all immediately adjacent walls and doors.
|
||||
var/turf/simulated/wall/T = get_step(src,dirn)
|
||||
if(locate(/obj/machinery/door/airlock) in T)
|
||||
var/obj/machinery/door/airlock/D = locate() in T
|
||||
if(D.density)
|
||||
D.open()
|
||||
if(istype(T,/turf/simulated/wall))
|
||||
T.dismantle_wall(1)
|
||||
del(src)
|
||||
|
||||
|
||||
/*Detonator, disguised as a lighter*/
|
||||
/*Click it when closed to open, when open to bring up a prompt asking you if you want to close it or press the button.*/
|
||||
|
||||
/obj/item/weapon/syndie/c4detonator
|
||||
icon_state = "c-4detonator_0"
|
||||
item_state = "c-4detonator"
|
||||
name = "\improper Zippo lighter" /*Sneaky, thanks Dreyfus.*/
|
||||
desc = "The zippo."
|
||||
w_class = 1
|
||||
|
||||
var/obj/item/weapon/syndie/c4explosive/bomb
|
||||
var/pr_open = 0 /*Is the "What do you want to do?" prompt open?*/
|
||||
|
||||
/obj/item/weapon/syndie/c4detonator/attack_self(mob/user as mob)
|
||||
switch(src.icon_state)
|
||||
if("c-4detonator_0")
|
||||
src.icon_state = "c-4detonator_1"
|
||||
user << "You flick open the lighter."
|
||||
|
||||
if("c-4detonator_1")
|
||||
if(!pr_open)
|
||||
pr_open = 1
|
||||
switch(alert(user, "What would you like to do?", "Lighter", "Press the button.", "Close the lighter."))
|
||||
if("Press the button.")
|
||||
user << "\red You press the button."
|
||||
flick("c-4detonator_click", src)
|
||||
if(src.bomb)
|
||||
src.bomb.detonate()
|
||||
log_admin("[user.real_name]([user.ckey]) has triggered [src.bomb] with [src].")
|
||||
message_admins("\red [user.real_name]([user.ckey]) has triggered [src.bomb] with [src].")
|
||||
|
||||
if("Close the lighter.")
|
||||
src.icon_state = "c-4detonator_0"
|
||||
user << "You close the lighter."
|
||||
pr_open = 0
|
||||
Reference in New Issue
Block a user